Please, can someone create indicator which will count candles!

Created at 28 Jan 2014, 21:13
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
AR

Archie

Joined 23.01.2014

Please, can someone create indicator which will count candles!
28 Jan 2014, 21:13


Good day to everyone!

 

I was using this indicator in MT4 (it count every second bar, for example 2 , 4, 6 and so on; otherwise too much numbers on chart), if it will count every candle/bar, I will be happy anyway!!!

I don't know how to use scripts and codes, so if someone can create such indicator, it will be GREAT! I hope it is easy...

 

Thank you in advance!

 

Kind regards,

Archie


@Archie
Replies

Archie
28 Jan 2014, 22:10

May be with code from MT4 will be easier:

int start()
  {
   datetime waktutaruh=WindowTimeOnDropped();
   double   hargataruh=WindowPriceOnDropped(),
            high=High[iBarShift(NULL, 0, waktutaruh)],
            low=Low[iBarShift(NULL, 0, waktutaruh)],
            thisbar,
            prevbar,
N=1.5+1;      //MODIFY THIS ACCORDING TO TOTAL PIPS ADDED ABOVE AND BELOW

   if(hargataruh==0)
   {
      if(ObjectFind("This Bar PS")>-1) ObjectDelete("This Bar PS");
      if(ObjectFind("Previous Bar PS")>-1) ObjectDelete("Previous Bar PS");
   }
      else
      {
         if(hargataruh>=high)
         {
            thisbar=((high-Low[0])/(Point*10))+N;
            prevbar=((high-Low[1])/(Point*10))+N;
            psinfo("This Bar", iTime(Symbol(), 0, 0), High[0]+0.001, DoubleToStr(thisbar, 1));
            psinfo("Previous Bar", iTime(Symbol(), 0, 1), High[1]+0.002, DoubleToStr(prevbar, 1));
         }
         if(hargataruh<=low)
         {
            thisbar=((High[0]-low)/(Point*10))+N;
            prevbar=((High[1]-low)/(Point*10))+N;
            psinfo("This Bar", iTime(Symbol(), 0, 0), Low[0]-0.001, DoubleToStr(thisbar, 1));
            psinfo("Previous Bar", iTime(Symbol(), 0, 1), Low[1]-0.002, DoubleToStr(prevbar, 1));
         }
         PlaySound("alert2.wav");
      }
   return(0);
  }

//---CREATE TEXT---
void psinfo(string nama, datetime waktu, double harga, string text)
  {
   if(ObjectFind(nama+" PS")<0) ObjectCreate(nama+" PS", OBJ_TEXT, 0, 0, 0);
   ObjectSet(nama+" PS", OBJPROP_TIME1, waktu);
   ObjectSet(nama+" PS", OBJPROP_PRICE1, harga);
   ObjectSet(nama+" PS", OBJPROP_BACK, false);
   ObjectSetText(nama+" PS", text, 10, "Trebuchet MS", Crimson);
   return(0);
  }

 


@Archie

Old Account
31 Jan 2014, 11:13

Try to use this

http://2calgo.com/

 


@Old Account

Archie
31 Jan 2014, 12:24

RE:

MRSV said:

Try to use this

http://2calgo.com/

 

Thank you. I tried to convert through 2calgo.com and it didn't convert. 


@Archie