- function definition unexpected ?????
- error 4108 invalid ORDER_TICKET!!
- MQL4 Learning
er007:
i been starting leaning mql4 code , and run into thise code:
can same explain thise 2 lines of code what they are doing and how they work?
barsper30 is the number of bars on the chart timeframe that will be in a M30 bar, so for a M5 chart the value will be 6, for an M15 chart the value will be 2. The 1.0 * is to type cast the ints to the double.
lastbar is the smaller ( MathMin ) of the 2 values
barsper30 is the number of bars on the chart timeframe that will be in a M30 bar, so for a M5 chart the value will be 6, for an M15 chart the value will be 2. The 1.0 * is to type cast the ints to the double.
lastbar is the smaller ( MathMin ) of the 2 values
you dont divided from right to left ?
https://docs.mql4.com/basis/operations/rules
can you tell me what the calculation on thise line meen?
lastbar= MathMin(Bars-20*barsper30-1, lastbar);
for what the "20" and the "-1"?
thank you a loot i appreciated very much.
you dont divided from right to left ?
https://docs.mql4.com/basis/operations/rules
can you tell me what the calculation on thise line meen?
lastbar= MathMin(Bars-20*barsper30-1, lastbar);
for what the "20" and the "-1"?
Divide from left to right ? PERIOD_M30 / Period() means divide PERIOD_M30 by Period() . . . or how many Period()s are there in PERIOD_M30
"can you tell me what the calculation on thise line meen? "
Not without spending a lot of time understanding all the rest of the code . . . . I don't have time for that right now.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use