Experts: Dynamic averaging

 

Dynamic averaging:

The EA implements averaging of positions. The average iStdDev is calculated in a sliding window.

Dynamic averaging

Author: Vladimir Karputov

 

The variable "level", taken from the "FreezeStopsLevels" function and passed to the "OpenPosition" composite function, where it finally calls the buy and sell functions, was not used.

These should receive a level (stop set), but the algorithm enters the market without setting a profit or loss.

The operational management has yet to be significantly improved.

However, it was reasonable.


I liked the logic of comparing the current standard deviation with the average for the period defined in the "Sliding window size" parameter,

and using it as the main condition for checking the stochastic.