Push bildirimleri daha uzun bir gecikmeyle gelir - sayfa 8

 
Andrey777 :

bot.SendMessage() her yere eklendi, ama bunu nereye ekleyeceğiz?

 #include <Telegram.mqh>
CCustomBot bot;
string Token= "574958800:AAF222222CuFoe75BsSIwK9bqqw7rrfagIk" ;

int OnInit ()
  {
//---
   bot.Token(token);
//---
   return ( INIT_SUCCEEDED );
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit ( const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick ()
  {
//---
    bot.sendMessage(------);
    bot.sendPhoto(---);
  }
//+------------------------------------------------------------------+

fotoğraf göndererek bakmak gerekir. Akşam bir bakarım.

 
tyup :

fotoğraf göndererek bakmak gerekir. Akşam bir bakarım.

- bot.sendMessage(------) eklendi nerede gerekli.

- katma

 #include <Telegram.mqh>
CCustomBot bot;
string Token= "574958800:AAF222222CuFoe75BsSIwK9bqqw7rrfagIk" ;

int OnInit() üzerindedir ancak bir bildirim göndermez. Sorun ne olabilir?

 
Andrey777 :

- bot.sendMessage(------) eklendi nerede gerekli.

- katma

int OnInit() üzerindedir ancak bir bildirim göndermez. Sorun ne olabilir?

init'te

bot.Token(Jeton);

da eklendi?

test komut dosyası çalışıyor mu?

 
tyup :

init'te

bot.Token(Jeton);

da eklendi?

test komut dosyası çalışıyor mu?

Test betiği çalışıyor, böyle oldu.

 //+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
#include <Telegram.mqh>
string Token= "744665737:AAH5MhCME439HGQyFIbe2cqq1U1-R1804tU" ;
CCustomBot bot;

int OnInit ()
{
      bot.Token(Token);
      

      
   SetIndexBuffer ( 0 ,DotUpbuf1);
   SetIndexStyle ( 0 , DRAW_ARROW );
   SetIndexArrow ( 0 , 108 );

   SetIndexBuffer ( 1 , Upbuf1);
   SetIndexStyle ( 1 , DRAW_ARROW , EMPTY , WidthArr2);
   SetIndexArrow ( 1 , 233 );
   
   SetIndexBuffer ( 2 ,DotDnbuf1);
   SetIndexStyle ( 2 , DRAW_ARROW );
   SetIndexArrow ( 2 , 108 );
   
   SetIndexBuffer ( 3 , Dnbuf1);
   SetIndexStyle ( 3 , DRAW_ARROW , EMPTY , WidthArr2);
   SetIndexArrow ( 3 , 234 );
   
   SetIndexBuffer ( 4 ,DotUpbuf2);
   SetIndexStyle ( 4 , DRAW_ARROW );
   SetIndexArrow ( 4 , 108 );

   SetIndexBuffer ( 5 , Upbuf2);
   SetIndexStyle ( 5 , DRAW_ARROW , EMPTY , WidthArr2);
   SetIndexArrow ( 5 , 233 );
   
   SetIndexBuffer ( 6 ,DotDnbuf2);
   SetIndexStyle ( 6 , DRAW_ARROW );
   SetIndexArrow ( 6 , 108 );
   
   SetIndexBuffer ( 7 , Dnbuf2);
   SetIndexStyle ( 7 , DRAW_ARROW , EMPTY , WidthArr2);
   SetIndexArrow ( 7 , 234 );
   
   SetIndexBuffer ( 8 , Upbuf1_1);
   SetIndexStyle ( 8 , DRAW_ARROW , EMPTY , WidthArr1);
   SetIndexArrow ( 8 , 233 );
   
   SetIndexBuffer ( 9 , Dnbuf1_1);
   SetIndexStyle ( 9 , DRAW_ARROW , EMPTY , WidthArr1);
   SetIndexArrow ( 9 , 234 );
   
   SetIndexBuffer ( 10 , Upbuf2_1);
   SetIndexStyle ( 10 , DRAW_ARROW , EMPTY , WidthArr1);
   SetIndexArrow ( 10 , 233 );
   
   SetIndexBuffer ( 11 , Dnbuf2_1);
   SetIndexStyle ( 11 , DRAW_ARROW , EMPTY , WidthArr1);
   SetIndexArrow ( 11 , 234 );
   
   ClearObjects();
   ClearObjectsOfFilter();
   
   return ( INIT_SUCCEEDED );
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
 //---------------------------------------------------------------------------------------------------------
   datetime headT = iTime ( Symbol (), Timeframe, 0 );
   if ( Period () > Timeframe) headT = Time [ 0 ];
   
   if (Signal && iBarShift ( Symbol (), 0 , timeSignal) > CT( 1 ))
      {
         if (Upbuf1[CT( 1 )]< EMPTY_VALUE || (UseTime2&&Upbuf2[CT( 1 )]< EMPTY_VALUE ))
         {
             Alert ( "Signal BUY - " + Symbol ());
             SendNotification ( "Signal BUY - " + Symbol ());
            bot.SendMessage( 337777772 , "Signal BUY - " + Symbol ());
            ChartBringToTop();
            timeSignal = iTime ( Symbol (), 0 , CT( 1 ));
         }
         if (Dnbuf1[CT( 1 )]< EMPTY_VALUE || (UseTime2&&Dnbuf2[CT( 1 )]< EMPTY_VALUE ))
         {
             Alert ( "Signal SELL - " + Symbol ());
             SendNotification ( "Signal SELL - " + Symbol ());
            bot.SendMessage( 337777772 , "Signal SELL - " + Symbol ());
            ChartBringToTop();
            timeSignal = iTime ( Symbol (), 0 , CT( 1 ));
         }
      }


//--- return value of prev_calculated for next call
   return (rates_total);
  }
//+------------------------------------------------------------------+
//=================================================================================================================
 
tyup :

init'te

bot.Token(Jeton);

da eklendi?

test komut dosyası çalışıyor mu?

Sağ?