CSymbolInfo - SessionOpen and SessionClose == 0

 

Hi

 

I'm trying to get open and close the day through the class CSymbolInfo. But in reality what they get is 0, I think that is okay because testing with the Bid or Ask get the correct value.


Code:

# include <Trade\SymbolInfo.mqh>; CSymbolInfo mysymbol;

int OnInit ()

   {

/ / ---

    mysymbol.Name (_Symbol);

    mysymbol.Refresh ();

    mysymbol.RefreshRates ();

    Print (mysymbol.Bid ());

/ / ---

    return (0);

   }


thank you


Bruno Neves

 

someone can help me, please

 
brunoneveslt:

someone can help me, please

Hi brunoneveslt,

It's called weekend.

I check and indeed their values are zero. So then, shall we look at open and close of daily chart ?

:D 

 
Thanks :)
 

Hi brunoneveslt,

I just check around, you may prefer to use SymbolInfoDouble(), with ENUM_SYMBOL_INFO DOUBLE : SYMBOL_SESSION_OPEN, SYMBOL_SESSION_CLOSE, or you can also use SymbolInfoSessionDoubleQuote() and SymbolInfoSessionTrade() - click all of that.

:D

 

Hi onewithzachy,


first of all congratulations for the Euro 2012 ... but we (Portugal) deserved to to win :)



About MQL... don't work too, i use copyrates(D1)



Thanks

Documentation on MQL5: Timeseries and Indicators Access / CopyRates
  • www.mql5.com
Timeseries and Indicators Access / CopyRates - Documentation on MQL5
 
brunoneveslt:

Hi onewithzachy,

first of all congratulations for the Euro 2012 ... but we (Portugal) deserved to to win :)

About MQL... don't work too, i use copyrates(D1)

Thanks

Hi brunoneveslt,

Hope so for the next EURO, sure hope so that they use Estoril again for F1 ;)

I found those on Saturday, And I didn't test them coz it was weekend and market was close.

:D 

 

Reason: