//+------------------------------------------------------------------+ //| Candle.mq5 | //| Copyright 2020, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2020, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" input int min_cons_candle=1; //MIN. COS. CANDLE //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- //Print("Init"); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- if(IsNewBar()) { //--- bool is_cons_bull=true; //--- for(int x=1; xopen) { return(true); } else { return(false); } //--- } //+------------------------------------------------------------------+ //| isbearish | //+------------------------------------------------------------------+ bool isbearish(int shift) { //--- double close=(iClose(_Symbol,PERIOD_CURRENT,shift)); //--- double open=(iOpen(_Symbol,PERIOD_CURRENT,shift)); //--- if(close