MQL4 Biggest body between last 20 candle - page 3

To add comments, please log in or register
tanggangsi
25
tanggangsi  

<CODE REMOVED>

Ubzen
5298
Ubzen  
Simon Gniadkowski
17644
Simon Gniadkowski  
tang15021122935:

<CODE REMOVED>


I removed your code . . . .


Please edit your post above and re-insert your code using the SRC button . . . please use the SRC button to post code: How to use the SRC button.

To edit your post . . .

RFB
127
RFB  
mostafa:
double badaneh = (O-C)/Point;

Any dividing with Point (or other) in such cases (especially if it is on PERIOD_M1 chart) when often bars are same price high and low, big % that script will be closed with zero_divide error.
whroeder1
17952
whroeder1  
rfb: Any dividing with Point (or other) in such cases (especially if it is on PERIOD_M1 chart) when often bars are same price high and low, big % that script will be closed with zero_divide error.
double badaneh = (O-C)/Point;
False. Point is 0.01 (jpy 4 digit broker) to 0.00001 (non-jpy 5 digit). Point is not zero, can NOT result in a zero divide. Dividing by badaneh might.
RFB
127
RFB  
WHRoeder:
False. ... can NOT result in a zero divide. Dividing by badaneh might.

True. Didn't give example, my explanation was short, sorry.

 double open = 0.0 , close = 0.0 , checkzero = ( open - close ) / Point ; // -> == OK
 Print ( " ( open - close ) / Point = " , checkzero ) ;
 double fx = checkzero / ( open - close ) ; // this one results with mentioned zero-divide error
 Print ( " checkzero / ( open - close ) = " , fx ) ; 

I wasn't detailed, but ... it is rare someone to stop there at first point of calculations without further calculations. (This is my case).

Anyway, thanks for correcting me, you were correct.

123
To add comments, please log in or register