/*[[ Name := TTF_combined_alert_15M Author := Copyright © 2004, MetaQuotes Software Corp. Link := http://www.metaquotes.net/ Lots := 1 Stop Loss := 999 Take Profit := 999 Trailing Stop := 999 ]]*/ Defines: Slip(5), risk(40), mm(0); var: mode(0), Ilo(0), cnt(0), b(0), b2(0), R(0), orders(0), sym(0), SignalMode(""), PositionAlreadyOpen(False),NowTriggerline(0),lastbarchecked(0); //If CurTime < LastTradeTime + 20 Then exit; If lastbarchecked = t[1] then exit; lastbarchecked = t[1]; if iwpr(100,2)<=-50 and iwpr(100,1)>-50 then { For cnt=1 to TotalTrades begin If mode=OP_BUY then { CloseOrder( Ord(cnt,VAL_TICKET), Ord(cnt,VAL_LOTS), Bid, Slip, Red); } else { CloseOrder( Ord(cnt,VAL_TICKET), Ord(cnt,VAL_LOTS), Ask, Slip, Red); } End; SetOrder( OP_BUY, lots, Ask, Slip, Ask-Stoploss*Point, Ask+TakeProfit*Point, White); Exit; } if iwpr(100,2)>=-50 and iwpr(100,1)<-50 then { For cnt=1 to TotalTrades begin If mode=OP_BUY then { CloseOrder( Ord(cnt,VAL_TICKET), Ord(cnt,VAL_LOTS), Bid, Slip, Red); } else { CloseOrder( Ord(cnt,VAL_TICKET), Ord(cnt,VAL_LOTS), Ask, Slip, Red); } End; SetOrder( OP_SELL, lots, Bid, Slip, Bid+Stoploss*Point, Bid-TakeProfit*Point, Red); }