formula write time lowprice canle period
-
Is it possible to write in formula time when lowest price happen.
We can write low price back 10candle like i show here.
http://fxdreema.com/shared/3ZeQ8XToc
but i need also a time when this low price happen. Is it possible, somehow?
Thank you -
It's not impossible. It's not added in fxDreema maybe because I never thought about it, but it can be done with some native MQL4 functions.... if you know what functions are.
http://docs.mql4.com/series/ilowest
http://docs.mql4.com/series/itimeThe first one gives you the shift of the candle where the lowest is, the second one uses that shift to give you the time of the candle. Ugly written:
iTime( NULL, 0, iLowest(NULL,0,MODE_LOW,10,0) )And you have to know what kind of value the Time is. It's integer (whole number) like here: http://www.epochconverter.com/
-
Thank you
I never write code but i will try it. Everything is first time. -
I have second question. Its about decimal format. When i run EA the formula write low price 4 decimal number like 1.3773 but the price is 1.37738. I change the global preferences but nothing happen. How do i change it?
-
If you print that value in some way, no worry, it's only displayed that way. If you use Print() for example, there is difference if you use "," or "+":
Print("Value = ",value);
Print("Value = "+value);
Using "+" will show more digits from the value.
-
Maybe it will be good to describe what i have problem. For future and other people.
I have two formula. They write low price. ( because i m work now i use dukascopy graf)
Logic
First condition happen - first formula look back 10 bars and write low price - pictures 1.
Second condition happen-second formula look back 10 bars and write price
but here comes problem It can be the same low price like first formula - pictures 2 - and i want avoid it this problem. The solution fot this can be compare time. i think this is correct or not so correct solution compare the price ( but here must be 5 decimal format and it can be the same price in different time(the possibilities is here)).
.Without problem show pictures 3.I will think about it and try find sollution but i dont know programing.
......
formula3.jpg
formula2.jpg
formula1.jpg -
Now i have idea. its simple. run the second condition only if bid price was under first low.
