I've written an EA based on an alligator strategy that uses shifted lines (8,13,21). The OrderSend function opens and closes on the 1st bar after the cross of the actual lines. Is there a way to modify this so that it orders on the bar that the shift is based on? For example, the pink box is where it is currently ordering a trade, but the blue box is where the order should be because I'm using an MA shifted 8. I've tried changing the shift to -8 but that doesn't work for my strategy. I'm drawing a blank on how to accomplish this, help would be appreciated.
- EA based on direction change of moving average
- Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes
- How to draw an arrow where the stop loss or the take profit have closed a buystop order
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register