pascalboy:
You have been asked before to use the SRC button to post code . . .Below, after the start function ,
in the for cycle,
i am triying to calculate increase/decrease ratio of bars.
the bars from 1 to 48 .
you will see red sections for calculations.
result is always zero.
why?
i have tried braces.
<SNIP>
Please edit your post . . . or have your code deleted
Please use this to post code . . . it makes it easier to read. If it's too big for the SRC box please attach the code as a .mql4 file
pascalboy:
At the part of the code in red the value of i is 47 so the variables Trend_Yukselis1 & Trend_Yukselis2 stay at their initial values of 0.0 and the Alert is never called . . . please explain why you think the situation should be any different ?
Below, after the start function ,
in the for cycle,
i am triying to calculate increase/decrease ratio of bars.
the bars from 1 to 48 .
you will see red sections for calculations.
result is always zero.
why?
You should write the calculation inside { }
for (i=0;i<=47;i++) { //--- write all your calculations here } //--- if(i==0) { //--- write all your calculations here }
pascalboy: braces braces braces... are they everything?:)
![RTFM](https://c.mql5.com/mql4/forum/2012/04/rtfm-yoda.jpg)
![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
Below, after the start function ,
in the for cycle,
i am triying to calculate increase/decrease ratio of bars.
the bars from 1 to 48 .
you will see red sections for calculations.
result is always zero.
why?
i have tried braces.
<SNIP>