Question to use 'SignalBaseGetDouble'

 

Hi.

I would like to check my subscribed Signal provider's Balance from EA, and find 'SignalBaseGetDouble' with SIGNAL_BASE_BALANCE.

So I tried SignalBaseGetDouble(SIGNAL_BASE_BALANCE), and it returns 0.8 when my signal provider has now $12,600 on MQL5 signal page.

 Could somebody tell me what I am doing wrong?

 It seems I can only get the  SIGNAL_INFO_VOLUME_PERCENT information right.

 

Thanks 

 

How could we say what you are doing wrong, when we don't know what you are doing ?

Show your code !

 

For now, I just want to know real time balance of my Signal provider's.

 

printf(DoubleToStr(SignalBaseGetDouble(SIGNAL_BASE_BALANCE)));

 

 

It shows some weird value from time to time, such as 0.8 ....sometimes way bigger (like more than 10 times) than what it shows on MQL5 signal page, which I don't understand. 

So I think I don't really understand the use of SignalBaseGetDouble .

 

Thanks. 

 
jiehooni:

For now, I just want to know real time balance of my Signal provider's.

 

printf(DoubleToStr(SignalBaseGetDouble(SIGNAL_BASE_BALANCE)));

 

 

It shows some weird value from time to time, such as 0.8 ....sometimes way bigger (like more than 10 times) than what it shows on MQL5 signal page, which I don't understand. 

So I think I don't really understand the use of SignalBaseGetDouble .

 

Thanks. 

That's all your code ? Where you signal is it selected ? Please read the documentation.
 
//--- get total amount of signals in the terminal 
   int total=SignalBaseTotal(); 
//--- process all signals 
   for(int i=0;i<total;i++) 
     { 
      //--- select the signal by index 
      if(SignalBaseSelect(i)) 
        { 
         //--- get signal properties 
         long   id    =SignalBaseGetInteger(SIGNAL_BASE_ID);          // signal id 
         string name  =SignalBaseGetString(SIGNAL_BASE_NAME);         // signal name 
         double bal   =SignalBaseGetDouble(SIGNAL_BASE_BALANCE);     // signal balance          

         if(id==SignalInfoGetInteger(SIGNAL_INFO_ID)) 
            PrintFormat("id=%d, name=\"%s\", balance=%f",id,name,bal); 
        } 
      else PrintFormat("Error in call of SignalBaseSelect. Error code=%d",GetLastError()); 
     } 

 -------------------------------------------------------------------------------------------

I get the Balance or Equity, but all the values look so different, like old, maybe about 2 weeks old? or more? compared to the ones on MQL5 signal page. 

 


Reason: