Problem with SymbolInfoDouble(Symbol(),SYMBOL_LASTHIGH) and SymbolInfoDouble(Symbol(),SYMBOL_LASTLOW)

 

Hi,
I have bad results with
 SymbolInfoDouble(Symbol(),SYMBOL_LASTHIGH) and SymbolInfoDouble(Symbol(),SYMBOL_LASTLOW) functions which give 0.0 result on mql5...Why ?
Maybe I have missed anything ... Normally these 2 functions give the more High and the more Low of the day.
I have resolved this problem by replacing respectively with iHigh(Symbol(),PERIOD_D1,0) and iLow(TradePairs[x],PERIOD_D1,0)

I would like to understand the problem

thanks

 
arcenciel :

Xin chào,
tôi có kết quả không tốt với các
 hàm SymbolInfoDouble (Symbol (), SYMBOL_LASTHIGH ) SymbolInfoDouble (Symbol (), SYMBOL_LASTLOW) cho kết quả 0.0 trên mql5 ... Tại sao?
Có lẽ tôi đã bỏ sót bất cứ điều gì ... This thông thường 2 chức năng cho càng nhiều Cao và càng nhiều Thấp trong ngày.
Tôi đã giải quyết vấn đề này bằng cách thay thế lần lượt bằng iHigh (Symbol (), PERIOD_D1,0) iLow (TradePairs [x], PERIOD_D1,0)

Tôi muốn hiểu vấn đề

cảm ơn

SymbolInfoDouble have 2 way to use. For getting a value, you should use the other way have 3 parameter. You can see it in mql5 document

SymbolInfoDouble(Symbol(),SYMBOL_LASTHIGH) have return boolean (just 0 or 1)
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
Symbol Properties - Environment State - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: