Just draw Trend Up or Trend Down before the Expert Advisor "TrendMeLeaveMe" start. Set properties, run expert and go to sleep or work.
This expert does not work automatically. You must draw trend up, trend down or horizontal trend. Name it buystop or sellstop , set BuyStop_StepUpper, BuyStop_StepLower, SellStop_StepUpper and SellStop_StepLower Properties.
When price enter area between your buystop trend and BuyStop_StepLower, expert will open buystop order at Price BuyStop_StepUpper. When price enter area between your sellstop trend and SellStop_StepUpper, expert will open sellstop order at Price SellStop_StepLower.
The expert will always modify OpenPrice to both orders when the price walks with the trends Until Price goes out Previuos area.
You can set BuyStop_StopLoss , BuyStop_Takeprofit and BuyStop_Lot to buystop. You can set SellStop_StopLoss , SellStop_Takeprofit and SellStop_Lot to sellstop.
Look this chart to more explain:
This is another example:
10 comments
To post a new comment, please, log in or register
DarkHTC wrote: After trying a good number of EAs that are found here, I have concluded that the purpose of most of the participants are just to post something, if really you EA do a good thing, here we have this yearly championship, try it there....
this is a manual trading expert , meaning it doesn't trade by it self how could Waddah use it on the championship !!
as the moved lines with the changed for each hour chart? I mean that EA should control current 1H candle and last 24 candles in order to change and set proper the lines. If the lower minimum candles was changed then the lines: SellStop_StepUpper, SellStop_StepLowerandsellstopshould be also change. If the upper max candleswas changed then the lines: BuyStop_StepUpper, BuyStop_StepLower, buystop should be also change.
After trying a good number of EAs that are found here, I have concluded that the purpose of most of the participants are just to post something, if really you EA do a good thing, here we have this yearly championship, try it there....
extern double Lots = 0.1; extern double target_tp1 = 25; // first level of the profit extern double target_tp2 = 36; // second level of the profit extern double target_tp3 = 54; // third level of the profit
.
.
.
// check for opened orders
for(cnt = 0; cnt < total; cnt++) { OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) { if(OrderType() == OP_BUY) // If long is opened { // we secure current profit or we are acepting the loss defined on hidden_StopLoss variable if(Bid <= (OrderOpenPrice()-(hidden_StopLoss*Point)) || Bid >= (OrderOpenPrice()+(hidden_TakeProfit*Point)) ) { OrderClose(OrderTicket(),Lots,Bid,3,Green); return(0); } // we secure third level of profit if(Bid >= OrderOpenPrice()+(target_tp3*Point)) { OrderModify(OrderTicket(), OrderOpenPrice(), Bid - (Point * (target_tp3-13)), Ask + (Point * hidden_TakeProfit), 0, Green); return(0); } // we secure second level of profit if(Bid >= OrderOpenPrice()+(target_tp2*Point) && Bid < OrderOpenPrice()+(target_tp3*Point)) { OrderModify(OrderTicket(), OrderOpenPrice(), Bid - (Point * (target_tp2-13)), Ask + (Point * hidden_TakeProfit), 0, Green); return(0); } // we secure first level of profit if(Bid >= OrderOpenPrice()+(target_tp1*Point) && Bid < OrderOpenPrice()+(target_tp3*Point) && Bid < OrderOpenPrice()+(target_tp2*Point)) { OrderModify(OrderTicket(), OrderOpenPrice(), Bid - (Point * (target_tp1-13)), Ask + (Point * hidden_TakeProfit), 0, Green); return(0); } } else // If short is opened { // we secure current profit or we are acepting the loss defined on hidden_StopLoss variable if(Ask >= (OrderOpenPrice()+ (hidden_StopLoss * Point)) || Ask <= (OrderOpenPrice()-(hidden_TakeProfit*Point)) ) { OrderClose(OrderTicket(),Lots,Ask,3,Red); return(0); } // we secure third level of profit if(Ask <= OrderOpenPrice()-(target_tp3*Point)) { OrderModify(OrderTicket(), OrderOpenPrice(), Ask + (Point * (target_tp3+13)), Bid - (Point * hidden_TakeProfit), Red); return(0); } // we secure second level of profit if(Ask <= OrderOpenPrice()-(target_tp2*Point) && Ask > OrderOpenPrice()-(target_tp3*Point) ) { OrderModify(OrderTicket(), OrderOpenPrice(), Ask + (Point * (target_tp2+13)), Bid - (Point * hidden_TakeProfit), Red); return(0); } // we secure first level of profit if(Ask <= OrderOpenPrice()-(target_tp1*Point) && Ask > OrderOpenPrice()-(target_tp2*Point) && Ask > OrderOpenPrice()-(target_tp3*Point) ) { OrderModify(OrderTicket(), OrderOpenPrice(), Ask + (Point * (target_tp1+13)), Bid - (Point * hidden_TakeProfit), Red); return(0); } return(0); } } } //---- return(0); } //+------------------------------------------------------------------+
This is a great tool. but sometimes the red dot lines do not show up. It does not
trade when dot lines are not visible. I don't know why. Anybody has the answer?
thanks
This is a great EA. I have tried this on demo the last few nights. I have been trying
to find or program a similar trend/order method (automated) for a while. I will
definetly be trying this further.
One suggestion would be a trailing stop even a multi-level/pyramiding trailing
stop ie; 0 to 30 pips profit use a 30 point trailing stop, 30 - 50 pips profit
use a 15 pip stop etc... for 2 or 3 levels. Iv'e had a quick look at the code to
do this but am not that fluent in mql4.... any way this is a great EA!