/*[[ Name := INDICATOR WITH ZIGZAG Author := AED-AL-NAIRAB Link := mail: nairab@p-i-s.com Separate Window := No First Color := Blue First Draw Type := Symbol First Symbol := 217 Use Second Data := Yes Second Color := Red Second Draw Type := Symbol Second Symbol := 218 ]]*/ Inputs: FontSize_Small_count(8), FontSize_Big_Final(12), PipsOffset(4), BarCount(200); Variable : shift(0), num(0), textVar(" "); var: myFileName(" "),myFile(0); var: alertTime(""); var: OrderText(""),AlertText(""); var: name(""), name_text("TrendCountName_Fostar_"); myFileName=Symbol + Period + " ZIGZAG-RSI"; SetLoopCount(0); for shift = 200 downto 0 Begin name = name_text + "1_" + NumberToStr(shift, 0); DelObject(name, 0, 0, 0, 0); end; For shift=200 Downto 0 Begin name = name_text + "1_" + NumberToStr(shift, 0); if iCustom("zigzag",mode_first,shift)>0 then num = iRSIEx(14,0,PRICE_WEIGHTED,MODE_FIRST,shift) else num = 0; if num > 0 then { textVar = iRSIEx(14,0,PRICE_WEIGHTED,MODE_FIRST,shift); MoveObject(name, OBJ_TEXT, time[shift], iCustom("zigzag",mode_first,shift), time[shift], iCustom("zigzag",mode_first,shift), red, 1, STYLE_SOLID); SetObjectText(name, textVar, "Arial Black", 8, red); //Alert(Month,"/",Day," ",alertTime," Enter on the next bar! ",Symbol," ", AlertText); myFile = FileOpen(myFileName,","); FileWrite(myFile, "It is a good time to enter on the next bar ", symbol , hour + ":" + Minute + ":" + Seconds + " GMT+2"); FileClose(myFile); }; SetIndexValue(shift, 0); End;