Wrong. There are no magic number tests in the code. It closes any order on the current chart. Manual or EA is irrelevant.
- What part of "closes on the current chart" was unclear? It doesn't "close any open trade."
- What doesn't work for you?
- Close Mode controls where market is vs MA
Stealth = 0, // Stealth: Bid <= MA or Ask >=MA Spread = 1 // Spread: Bid < MA and Ask > MA
The default is Stealth (0) so it will close the buy order if the Bid is below MA and sell order when Ask is above MA. As opposed to crossing MA.
-
Only bug I see, the sign wrong for buyss when using Points_to_cross (default=0.)
Fixed and attachedBuy orders Bid <= ma - Points_to_cross
solid cross Sell orders Ask >= ma - Points_to_cross
premature close
- What part of "closes on the current chart" was unclear? It doesn't "close any open trade."
- What doesn't work for you?
yeah ok my wording was unhelpful there, I understand what you mean by closes on the current chart.
What seems to happen is that whenever a new trade is opened on the chart that the EA is running on it is immediately closed despite it not being near the MA selected in the settings; i.e price isn't crossing the MA.
I suggested you try it on a demo and then you'll understand what I mean hopefully. Thanks
- What part of "closes on the current chart" was unclear? It doesn't "close any open trade."
- What doesn't work for you?
- Close Mode controls where market is vs MA
The default is Stealth (0) so it will close the buy order when Bid goes below MA and sell order when Ask goes above MA.
-
Only bug I see, the sign wrong for sells when using Points_to_cross (default=0.)
Fixed and attachedBuy orders solid cross Sell orders premature close
Will try this second version out, thank you
William Roeder:
- What part of "closes on the current chart" was unclear? It doesn't "close any open trade."
- What doesn't work for you?
- Close Mode controls where market is vs MA
The default is Stealth (0) so it will close the buy order if the Bid is below MA and sell order when Ask is above MA. As opposed to crossing MA.
-
Only bug I see, the sign wrong for buyss when using Points_to_cross (default=0.)
Fixed and attachedBuy orders solid cross Sell orders premature close
works perfectly, think it was the sell order problem that made it close straight away and hence caused the misunderstanding.
Thanks William appreciate the effort!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Looking for someone to edit this existing MA Cross EA that automatically closes positions when price touches the pre-determined MA.
Currently it will only close positions accurately when they are generated by an existing EA rather than when manually placed so I need someone to add a Magic Number generator for the Cross EA so that it knows which positions to close.
Thanks in advance.