I am trying to write an indicator that I am using on tradingview. Everything is fine but I couldn't plot it straight. It supposed to be as the photo I attached. What's wrong with my code?
Files:
eurusd_meta5.jpg
148 kb
eurusdpmax_trading.jpg
108 kb
- Help on Stochastic mql4 code
- Plotting lines in an EA
- Indicator not plotting on strategy tester
Decompose this line:
PMAXBuffer[i] = (PMAXBuffer[i-1] == FUB[i-1] && MABuffer[i]<FUB[i] ) ? FLB[i] : (PMAXBuffer[i-1] == FUB[i-1] && MABuffer[i]>FUB[i]) ? FLB[i] : (PMAXBuffer[i-1] == FLB[i-1] && MABuffer[i]<FLB[i] ) ? FUB[i] : FUB[i] ;
into a couple of ifs in several lines and go through it with the debugger! Here you assign always FLB[i] in every branch of ? and :?
Carl Schreiber #:
Decompose this line:
into a couple of ifs in several lines and go through it with the debugger! Here you assign always FLB[i] in every branch of ? and :?
Thank you for the spot that you made me see. Wrong part has been corrected and I realized 1 more line that I didn't write. Now its working. Best regards.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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