what currency pair?
for all, and all timeframes.
for all, and all timeframes.
Anyone else incline to help out a non-programmer with this risk reward set up? Thanks.
chase_trend
actually, forex like GBPUSD have 55% is being weak, and the rest being strong ~ ~
so i don't think your idea will work~ ~
plz forgive if make any offense
- One hour after U.S. market close EA shut down till 3 hours before London open, (apply only to 1hr timeframe and below).
A drop down menu to change EA operation time would be cool too.
-Stop loss always placed 30 pips below / above the High or Low. (enable manual change)
For exmample:
The distance from entry and stop will be used as risk reward, not including the 30 pips extra.
For example:
onwards from 1.2580 which is 20 pips. So once the price move up 20 pips (note it will enter 3 positions on every signal), the first lot is taken out with 20 pips profit and then the stop comes to break even on the other 2 lots. Would be good if you can create a drop down menu for how many positions per signal also. So the other 2 positions, once price reaches 2:1 (40 pips in this case) then another profit is taken.. And leave the 3rd and last position for 3:1 (60 pips)
important thing after 1:1 stops for the last remaining 2 positions goes to break even.
I attached you a .gif so you see what I mean.
Cheers.
extern int TrailingStop = 30;
extern int StopLoss = 0;
extern double Lots = 0.1;
extern int magicnumber = 777;
extern bool PolLots = true;
extern int MaxOrders = 1;
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
int i=0;
int total = OrdersTotal();
for(i = 0; i <= total; i++)
{
if(TrailingStop>0)
{
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if(OrderMagicNumber() == magicnumber)
{
TrailingStairs(OrderTicket(),TrailingStop);
}
}
}
bool SellOp=false;
if (High[0]>High[1]&&High[1]>High[2]&&High[2]>High[3]&&Open[0]>Open[1]&&Open[1]>Open[2]&&Open[2]>Open[3]) BuyOp=true;
if (High[0]<High[1]&&High[1]<High[2]&&High[2]<High[3]&&Open[0]<Open[1]&&Open[1]<Open[2]&&Open[2]<Open[3]) SellOp=true;
return(0);
prevtime = Time[0];
if(!IsTradeAllowed())
{
prevtime = Time[1];
return(0);
}
if (total < MaxOrders || MaxOrders == 0)
{
if(BuyOp)
{
if (StopLoss!=0)
{
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-(StopLoss*Point),Ask+(TakeProfit*Point),"OpenTiks_Buy",magicnumber,0,Green);
}
else
{
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+(TakeProfit*Point),"OpenTiks_Buy",magicnumber,0,Green);
}
}
if(SellOp)
{
if (StopLoss!=0)
{
OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+(StopLoss*Point),Bid-(TakeProfit*Point),"OpenTiks_Sell",magicnumber,0,Red);
}
else
{
OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-(TakeProfit*Point),"OpenTiks_Sell",magicnumber,0,Red);
}
}
{
}
return(0);
}
//+------------------------------------------------------------------+
void TrailingStairs(int ticket,int trldistance)
{
int Spred=Ask - Bid;
if (OrderType()==OP_BUY)
{
if((Bid-OrderOpenPrice())>(Point*trldistance))
{
if(OrderStopLoss()<Bid-Point*trldistance || (OrderStopLoss()==0))
{
OrderModify(ticket,OrderOpenPrice(),Bid-Point*trldistance,OrderTakeProfit(),0,Green);
if (PolLots)
if (NormalizeDouble(OrderLots()/2,2)>MarketInfo(Symbol(), MODE_MINLOT))
{
OrderClose(ticket,NormalizeDouble(OrderLots()/2,2),Ask,3,Green);
}
else
{
OrderClose(ticket,OrderLots(),Ask,3,Green);
}
}
}
}
else
{
if((OrderOpenPrice()-Ask)>(Point*trldistance))
{
if((OrderStopLoss()>(Ask+Point*trldistance)) || (OrderStopLoss()==0))
{
OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*trldistance,OrderTakeProfit(),0,Red);
if (PolLots)
if (NormalizeDouble(OrderLots()/2,2)>MarketInfo(Symbol(), MODE_MINLOT))
{
OrderClose(ticket,NormalizeDouble(OrderLots()/2,2),Bid,3,Green);
}
else
{
OrderClose(ticket,OrderLots(),Bid,3,Green);
}
}
}
}
}
yeah.. I'm not sure how to sort it all out correctly, just copied the main scripts from another EA.... I guess those fixed stops and trails can be deleted from the script, most important is the buy sell signals, the if (Close[2]>Close[3]) BuyOP etc... the strategy works on my live trading, I'd just really like to backtest and see the results, it will not be close to manual trading cause of confluence areas etc.. but I have gotten quite nice results on some pairs with the fixed stops, trails and target profit... a dynamic one would way more logical..
thx for posting it up chiwing
There will be 3 positions on each signal y'know, if the stop is 50pips and it hits the first target which is 1:1 (50pips), then the stop of the other two lots goes to break even, next target is then 2:1 which will be 100 pips, and the last position for 3:1, 150 pips.... basically how many times you're making compare to your risk/stop.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I got all the details zipped up, with a capture and so on and so fort. It's not a big pieces of coding I'm sure for those who knows, I'm just really bad at it. Appreciate it! Cheers.
mank