AR
Topics
28 Jan 2014, 21:13
3502
4
23 Jan 2014, 14:48
0
3128
3
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
Archie
31 Jan 2014, 12:24
RE:
MRSV said:
Thank you. I tried to convert through 2calgo.com and it didn't convert.
@Archie