Hello,
i'm new to Mql4 and although i have managed to create some basic algorithms for EAs, i am struggling with creating a particular EA for one of the strategies that i have been using for a couple months. You can find the basis of the strategy in this video:
86% Win Rate Highly Profitable Secret Strategy | RSI + Secret Indicator
The code that i have written up till now is as below:
It does not show any error when compiling but when i try in on the Back Tester, it opens no trades whatsoever.
The issues i think this one has:
1-) I'm trying to add a Stop Loss 1 pip below the low of the last candle. But i'm not sure if the "Low[1]-StopLoss" section in OrderSend is the right way to go. I guess Take Profit value has the same issue as well.
2-) I think there's a mistake with BUY and SELL conditions too. For BUY condition i have tried with "if (PRICE_OPEN > HalfTrend) {" and "if (Open[0] > HalfTrend) {" both to no avail.
Any help or suggestions would be greatly appreciated.
Well a lot of things needs to be corrected but for start
PRICE_OPEN is an enumeration. It doesn't hold the price data for bar open.
Use
Open[0] // Current bar open
You would also need to get the trend value of the half trend indicator to identify up trend and down trend.
So the logic can be
if(half trend==upTrendVal && rsiPreviousBar<10 && closeCurrentBar>previousHigh) // Buy order // Opposite for sell order
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
i'm new to Mql4 and although i have managed to create some basic algorithms for EAs, i am struggling with creating a particular EA for one of the strategies that i have been using for a couple months. You can find the basis of the strategy in this video:
86% Win Rate Highly Profitable Secret Strategy | RSI + Secret Indicator
The code that i have written up till now is as below:
It does not show any error when compiling but when i try in on the Back Tester, it opens no trades whatsoever.
The issues i think this one has:
1-) I'm trying to add a Stop Loss 1 pip below the low of the last candle. But i'm not sure if the "Low[1]-StopLoss" section in OrderSend is the right way to go. I guess Take Profit value has the same issue as well.
2-) I think there's a mistake with BUY and SELL conditions too. For BUY condition i have tried with "if (PRICE_OPEN > HalfTrend) {" and "if (Open[0] > HalfTrend) {" both to no avail.
Any help or suggestions would be greatly appreciated.