A cup of coffee and a few lines of code!

A cup of coffee and a few lines of code!

Dec 07, 2022

I liked the idea of the automatic strategy, which places a grid of orders without thinking in advance where the price will go! Well, not really thinking. I decided to place limit orders every time the current price was within the average price with period 14, the important criteria for placing orders were (number, distance from each other, and a new grid will not be built until there are open orders of the previous grid, and if no order of the built grid was opened before the new signal, then at the time of the new signal the previous grid is canceled and a new one is built, to keep the current average price).The auto-strategy parameters are set as 10 orders in a grid with a distance of 200 ticks from each other. So, according to the results of the backtest, something interesting has come out.

Backtesting period was for the current trading session, as we see the result was $374 trading 1 lot of ETHUSD. Profit factor 99.00, Percent profitable 88.89%. The yield curve is unusually smooth and gradual.

This is how the trades look like on the chart:

It will be interesting to test it in the real market and on duration, as well as continue to find solutions to optimize and improve it. For a cup of coffee I will send those who want to test it and see the code.напишите [email protected]. There are also many other NinjaScripts here. Until new ideas!:)

Enjoy this post?

Buy Advanced Software Features a coffee