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
bool Sell=Bid>BBUp[1] && ADX[1]<ADXLevel && (LastDealType()==0 || LastDealType()==1)
Does this mean that only a trend check is performed before entering on a BB breakdown?
i.e. if the ADX trend is bullish (+DI is higher than -DI) an entry will be made on the breakdown of the lower BB boundary, but if the ADX trend is bearish (-DI is higher than +DI) no entry will be made on the breakdown of the lower BB?
The main line(MAIN_LINE) does not count at all?
1. I have no trades open in the tester. There are no error messages in the logs. I have set the parameters as in the picture https://www.mql5.com/en/code/13315.
I'm figuring it out.
2. Based on the code:
There is no question of the price crossing the BB lines to enter a position at all.
Here are the conditions for a buy:
The price of the Ask instrument is below the lower BB band on the first formed bar and the value of ADX from MAIN_LINE on the first formed bar is below the value of its ADXLevel (like a flat), and the previous deal in the history was a Buy or there were no deals at all.
For sells - mirror image.
Can you tell me how to test it?
I do not open trades - the journal is clean. I have set all parameters as necessary: depo size 100 000, min lot 1, at 10 000 and min lot 0,1 - also did not test. Broker BKS. MT5. Values of external variables as on the picture from the first page. EURUSD. M15. And the test goes on OHLC on M1 since 2010. Leverage 1:100.
1. I have in the tester - trades are not opened. There are no error messages in the logs. I have set parameters as in the picture https://www.mql5.com/en/code/13315.
I'm figuring it out.
2. Based on the code:
There is no question of the price crossing the BB lines to enter a position at all.
Here are the conditions for a buy:
The price of the Ask instrument is below the lower BB band on the first formed bar and the value of ADX from MAIN_LINE on the first formed bar is below the value of its ADXLevel (like a flat), and the previous deal in the history was a Buy or there were no deals at all.
For sells - mirror image.
Thank you very much for the clarification!
Does not open trades based on what you said it is hard to say why, I have met many EAs that do not open trades at certain tp and sl. I have to try to go through these parameters.
I can say for sure that it is tested through the terminal of broker-Opening and demo-terminal of forex DC Alpari.
Thank you so much for the clarification!
Does not open trades based on what you said it is hard to say why, I have met many EAs that do not open trades at certain tp and sl. It is necessary to try to search these parameters.
I can accurately say that it is tested through the terminal of the broker-Opening and demo-terminal forex DC Alpari.------------------------------------------understood thank you. I will test it on the opening terminal. It is not possible to write a normal reply from my mobile phone. the cursor keeps jumping to your post. BAG. I will write to the service desk later.
Thanks for this tiny simple example using BB+ADX indicator.
After some improvements (and especially adding +DI, -DI), I got very good results.
Allow me to point out the "IsNewBar" function which doesn't work :
The "m_TOld" variable is not static and will always be different than "TNew".
You can replace it by that : (see: https://www.mql5.com/en/articles/22)
And now there is no more problem.
Best wishes ;)