A Grid Ordering Method Based on Step Arithmetic Sequence

When the weighted average of a certain trading target is obtained (refer to using NumPy statistical functions to analyze the amplitude ), the most suitable grid order price range on the second day can be calculated based on this value.
The idea is as follows:

price

  • The upward price uses a proportional number sequence :
    the price of the first upward gear is the current price * (1+weighted average value)
    and the other upward gears increase in the same proportion on the basis of the first gear.
  • The downward price uses an arithmetic sequence :
    the difference is the price of the first step upward - the current price,
    and the price of the downward step forms an arithmetic sequence according to the difference.

quantity

The quantity difference uses the stepped arithmetic sequence. An
arithmetic sequence is 0.01, 0.02, 0.03, 0.04, and only rises every 3 distances, while the stepped arithmetic sequence is
0.01, 0.01, 0.02, 0.02, 0.02 , 0.03, 0.03, 0.03, 0.04, 0.04, 0.04, 0.05
Based on the quantity difference, the quantity value is calculated after accumulation
0.01, 0.011, 0.013, 0.015, 0.017, 0.02, 0.023, 0.026, 0.03

The above ideas are implemented using Python3 as follows:

#向上等比,向下等差
price_start = 305
quantity_start

Guess you like

Origin blog.csdn.net/bitquant/article/details/124866569