The attached strategy will Buy if the MA changes direction and moves up and Sell if the MA changes direction and moves down.
The skipfirst logic ignores the first direction found when the strategy is started to force the strategy to wait until a change of direction has occurred before placing the first trade.
Please can you change the attached strategy in the following way:
Remove the logic relating to skipfirst and FIRST_DIRECTION.
Replace this with the ability to set the Initial AllowedSide to either BUY or SELL for the first trade direction (ie if no trades already exist for the selected currency).
Once the first trade has been made or if a trade already exists for the currency then the AllowedSide should automatically be set to BOTH.
NB
This needs to be currency specific as I have other strategies running on other currencies at the same time.
Also I know there may be other ways to achieve this but I really need it done as detailed above as I have other more complicated strategies which will also rely on the logic created here.
Many thanks for all your help.