Custom MQL Code Round Function
-
Hi,
If you don't mind I have a beginner question.
I am trying to calculate 1.618 Fibonacci Time Extension of last "n" period candles highest and lowest price times.
Variable A = Highest Price Candle ID
Variable B = Lowest Price Candle IDVar C = Var A - Var B ( A>B)
Var D = Var C * 1.618 (calculated with formula window)
Var E = round (Var D) --> I want to round Var D value to nearest integer. For this step I think I must use "Custom MQL Code Module"?
I tried "E = MathRound (D);" code in Custom MQL Code window but i got error messages like this;
Compilation errors
'Double' - undeclared identifier
'E' - undeclared identifier
'E' - some operator expected
'D' - undeclared identifier
'D' - some operator expectedhttps://fxdreema.com/shared/kqoOXuFcc
Please help

-
One more case when someone is using those Terminal Variables. I don't know what to do with them anymore

Do it like this - http://prntscr.com/a8e1ft Terminal Variables are NOT those blue Variables.
-
Thank you very much