So im new to programmer and just wanted to create a simple EA price crosses and closes above 2 moving averages, However once a take profit is hit it opens a new buy order on the next bar after take profit which I do not want, so im trying to stop same direction trades until an opposite signal has opened and closed and for some reason I am having great difficulty accomplishing this in MQL5 so I figured I would reach out here for assistance
Moving Average - Trend Indicators - MetaTrader 5 Help
- www.metatrader5.com
The Moving Average Technical Indicator shows the mean instrument price value for a certain period of time. When one calculates the moving average...
- Simple experts
- Help! multiple trade on one candlestick in the same direction
- Help! Close order and open opposite direction of trade on MQL5
if(signal_entry==TRADE_SIGNAL_BUY){
You are looking at a signal. Act on a change of signal.
MQL4 (in Strategy Tester) - double testing of entry conditions - MQL5 programming forum #1 (2017)
William Roeder #:
You are looking at a signal. Act on a change of signal.
MQL4 (in Strategy Tester) - double testing of entry conditions - MQL5 programming forum #1 (2017)
thank you so much for the reply William self teaching can be hard sometimes and i really appreciate trying to point me in the right direction!
Also just another question so your saying to change the buy signal to stop same direction trades, so would you have to do that with getting the last position and seeing whether it was a buy or a sale?
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