int OnInit(){ printf( TICK_FLAG_BID + " = TICK_FLAG_BID - тик изменил цену бид"); printf(TICK_FLAG_ASK + " = TICK_FLAG_ASK – тик изменил цену аск"); printf(TICK_FLAG_LAST + " = TICK_FLAG_LAST – тик изменил цену последней сделки"); printf(TICK_FLAG_VOLUME + " = TICK_FLAG_VOLUME – тик изменил объем"); printf(TICK_FLAG_BUY + " = TICK_FLAG_BUY – тик возник в результате сделки на покупку"); printf(TICK_FLAG_SELL + " = TICK_FLAG_SELL – тик возник в результате сделки на продажу"); return(INIT_SUCCEEDED); } int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { MqlTick last_tick; if(SymbolInfoTick(Symbol(),last_tick)){ if((last_tick.flags & TICK_FLAG_BUY) == TICK_FLAG_BUY) printf("BUY - " + last_tick.flags + " Volume - " + last_tick.volume); else if((last_tick.flags & TICK_FLAG_SELL) == TICK_FLAG_SELL) printf("Shell - " + last_tick.flags + " Volume - " + last_tick.volume); else printf("Other - " + last_tick.flags + " Volume - " + last_tick.volume); } return(rates_total); }