New here .. backtesting grid bots

Hi everyone, Im new here so perhaps i cant figure it out. Im trying to backtest a grid bot, however, in order to get meaningful results, id like it start relative to the price of the first data point in the backtest data, not the current price. is that possible?

to be more clear, lets say today CROUSDT is 0.15 and the grid is set up around that 10% higher and lower. if i select a starting date where cro starts at 0.10 and ranges to max 0.12 i will get no trades

Not sure if I understood what you want. We already use the price of the first candle not the current candle.

I will try to explain better. Lets assume I want to start today a BTC-USDT grid bit. The price is 94955 and the grid will be ± 10% of that. If for example, I want to backtest the grid settings on the October 2924 data, it will show no trades as it still uses todays BTC price as the starting grid point in the October candles.

I have found an workaround to actually look at the starting candle in the backtest data, and manually change the starting grid price to something within that candle, but maybe this could all be done automatically with an option

Also, could we add trailing up and down for grids? The option I mentioned above would come in even more useful if you were able to add this feature as well

Another thing that would be useful imo is having the simple grid start on certain technical conditions being met. its what brought me here from bitsgap but i see its only available for combo bots

This is how it needs to be done. And even so, I would advice you against it. The behavior of btc at this price point will likely be different than how it was at the start of the backtest. Backtesting different price ranges and assuming that it will behave the same is wrong. I think grid backtesting makes more sense when you are backtesting an area where btc has been before and you think there is a high chance of repeating the same pattern.

For what you want to accomplish the combo is better suited.

1 Like

the backtesting is mostly to figure out whats the most optimal grid spacing % for a particular coin pair