//PIPSTALKER EA by tdion int ticket1, ticket2, ticket3, ticket4, ticket5, ticket6, ticket7, ticket8, ticket9, ticket10; double o, h, l, c; extern int TP = 145; extern int TP2 = 300; extern int SL2 = 40; extern int SL = 37; extern int trigger = 55; extern int trigger2 = 20; extern bool TrailingStopMode = True; extern int TrailingStop = 20; double size; double balance; double balancehigh=0; bool done; bool open; int start() { done = false; balance = AccountEquity(); if(balance>balancehigh) balancehigh = balance; //size=(MathRound(AccountEquity()/2000))/10; size=0.1; if((balance/balancehigh)>0.89) { //size =(MathRound(AccountEquity()/1000))/10; } if(Open[0]!=o) if(High[0]!=h) if(Low[0]!=l) if(Close[0]!=c) { o = Open[0]; h = High[0]; l = Low[0]; c = Close[0]; //trigger bars if((Close[1] - Open[1] > trigger*Point)||(Open[1] - Close[1] > trigger*Point)) if((iRSI(NULL,0,14,PRICE_CLOSE,1)<70)&&(iRSI(NULL,0,14,PRICE_CLOSE,1)>30)) { ticket1=OrderSend(Symbol(),OP_BUY,size,Ask,3,Ask-SL*Point,Ask+TP*Point,NULL,0,0,Green); ticket2=OrderSend(Symbol(),OP_SELL,size,Bid,3,Bid+SL*Point,Bid-TP*Point,NULL,0,0,Red); done = true; } //pinnochio bars if((Low[2] < Low[1] - 25*Point)&&(Low[2] < Low[3] - 25*Point)) if(!done) { done=true; ticket5=OrderSend(Symbol(),OP_BUY,size,Ask,3,Ask-30*Point,Ask+100*Point,NULL,0,0,Green); } //double bar resistance if((High[2] > High[1] + 25*Point)&&(High[2] > High[3] + 25*Point)) if(!done) { done = true; ticket6=OrderSend(Symbol(),OP_SELL,size,Bid,3,Bid+30*Point,Bid-100*Point,NULL,0,0,Green); } //consolidation breakout if(!done) { if(MathAbs(Low[2] - Low[1]) < Point*2) if(Low[1] < Close[1] - Point*45) { done = true; ticket7=OrderSend(Symbol(),OP_BUY,size,Ask,3,Ask-45*Point,Ask+150*Point,NULL,0,0,Green); } if(MathAbs(High[2] - High[1]) < Point*2) if(High[1] > Close[1] + Point*45) { ticket8=OrderSend(Symbol(),OP_SELL,size,Bid,3,Bid+45*Point,Bid-150*Point,NULL,0,0,Green); done = true; } } //Trailing stop if(TrailingStopMode && TrailingStop > 0) { if(Bid - OrderOpenPrice() > Point * TrailingStop) { if(OrderStopLoss() < Bid - Point * TrailingStop) { OrderModify(OrderTicket(), OrderOpenPrice(), Bid - Point * TrailingStop, OrderTakeProfit(), 0, MediumSeaGreen); return(0); } } } //Trailing stop if (TrailingStopMode && TrailingStop > 0) { if((OrderOpenPrice() - Ask) > (Point * TrailingStop)) { if((OrderStopLoss() > (Ask + Point * TrailingStop)) || (OrderStopLoss() == 0)) { OrderModify(OrderTicket(), OrderOpenPrice(), Ask + Point * TrailingStop, OrderTakeProfit(), 0, DarkOrange); return(0); } } } if(!done) { open=true; for(int i=10;i>1;i--) if(MathAbs(Open[i] - Close[i]) > Point*10) open=false; if(open) if(Close[1] - Open[1] > Point*20) if(Close[1] - Open[1] < Point*55) if((iRSI(NULL,0,96,PRICE_CLOSE,1)>50)) { ticket9=OrderSend(Symbol(),OP_BUY,size,Ask,3,Ask-40*Point,Ask+200*Point,NULL,0,0,Green); } open=true; for(i=10;i>1;i--) if(MathAbs(Open[i] - Close[i]) > Point*10) open=false; if(open) if(Open[1] - Close[1] > Point*20) if(Open[1] - Close[1] < Point*55) if((iRSI(NULL,0,96,PRICE_CLOSE,1)<50)) { ticket10=OrderSend(Symbol(),OP_SELL,size,Bid,3,Bid+40*Point,Bid-200*Point,NULL,0,0,Red); } } } return(0); }
Sample
Analysis
Market Information Used:
Series array that contains open prices of each bar
Series array that contains the highest prices of each bar
Series array that contains the lowest prices of each bar
Series array that contains close prices for each bar
Indicator Curves created:
Indicators Used:
Relative strength index
Custom Indicators Used:
Order Management characteristics:
It automatically opens orders when conditions are reached
It can change open orders parameters, due to possible stepping strategy
Other Features: