Have you tried other pairs beside the JPY?phil_trade wrote:I'm in V4...so already tested this. I have a bunch of parameters nowmichalkraus wrote:Phil I got an idea, try to test the same conditions, but just dont count the first one hour candle of the week, so the zone will be created by the second candle of the week and last candle before london session starts. I think we can avoid the first large candle, i hope this could help....![]()
The fact is that this strategy has a good potential, but from time to time, can add loss after loss that could blow up your account, specially with so much JPY pairs.
So I'm trying a lot of MM module, filters etc to obtain a smooth result.
cheers
Philippe
Brakeout of the monday's night
-
michalkraus
- Trader
- Posts: 22
- Joined: Sun Sep 02, 2012 2:29 pm
Re: Brakeout of the monday's night
-
phil_trade
Re: Brakeout of the monday's night
XAUUSDmichalkraus wrote:Have you tried other pairs beside the JPY?phil_trade wrote:I'm in V4...so already tested this. I have a bunch of parameters nowmichalkraus wrote:Phil I got an idea, try to test the same conditions, but just dont count the first one hour candle of the week, so the zone will be created by the second candle of the week and last candle before london session starts. I think we can avoid the first large candle, i hope this could help....![]()
The fact is that this strategy has a good potential, but from time to time, can add loss after loss that could blow up your account, specially with so much JPY pairs.
So I'm trying a lot of MM module, filters etc to obtain a smooth result.
cheers
Philippe
-
phil_trade
Re: Brakeout of the monday's night
Version V6
this should be acceptable no ?
BenchMark EURJPY just oPtimised on worst period of 2010 - a little bit flat on 2013
this should be acceptable no ?
BenchMark EURJPY just oPtimised on worst period of 2010 - a little bit flat on 2013
You do not have the required permissions to view the files attached to this post.
-
michalkraus
- Trader
- Posts: 22
- Joined: Sun Sep 02, 2012 2:29 pm
Re: Brakeout of the monday's night
Hello Phill great to here that you could optimised, with such a great results. I guess you are testing other pairs arent you? I hope that live results will be about the samephil_trade wrote:Version V6
this should be acceptable no ?![]()
BenchMark EURJPY just oPtimised on worst period of 2010 - a little bit flat on 2013![]()
-
phil_trade
Re: Brakeout of the monday's night
As you can see, this strategy, as a lot, need some trend to return some gains. Since beginning 2013, it's quite flat... so live trading will depend on trend or not !michalkraus wrote:Hello Phill great to here that you could optimised, with such a great results. I guess you are testing other pairs arent you? I hope that live results will be about the samephil_trade wrote:Version V6
this should be acceptable no ?![]()
BenchMark EURJPY just oPtimised on worst period of 2010 - a little bit flat on 2013![]()
thank you man for so much work
Yes, I will try with other pairs asap
- SpiderX
- Trader
- Posts: 554
- Joined: Thu Aug 22, 2013 4:50 pm
Re: Brakeout of the monday's night
Hi Phil,
I just recalled that i have read about a similar strategy to this before.
There are some additional rules for this:
1. Zone must be minimum n pips. (80-90 pips, have to optimize)
2. Previous week should have strong directional movement and only trade in the previous week's direction.
(My guess: Assume that this means that previous weekly candle has short wick and long body relative to the wick, body length minimum x pips, or maybe some function of ATR ?)
The end result should be fewer setups, but higher probability wins.
Can you try this out ?
Cheers
I just recalled that i have read about a similar strategy to this before.
There are some additional rules for this:
1. Zone must be minimum n pips. (80-90 pips, have to optimize)
2. Previous week should have strong directional movement and only trade in the previous week's direction.
(My guess: Assume that this means that previous weekly candle has short wick and long body relative to the wick, body length minimum x pips, or maybe some function of ATR ?)
The end result should be fewer setups, but higher probability wins.
Can you try this out ?
Cheers
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
-Corinthians 13:4-8
-
phil_trade
Re: Brakeout of the monday's night
HelloSpiderX wrote:Hi Phil,
I just recalled that i have read about a similar strategy to this before.
There are some additional rules for this:
1. Zone must be minimum n pips. (80-90 pips, have to optimize)
2. Previous week should have strong directional movement and only trade in the previous week's direction.
(My guess: Assume that this means that previous weekly candle has short wick and long body relative to the wick, body length minimum x pips, or maybe some function of ATR ?)
The end result should be fewer setups, but higher probability wins.
Can you try this out ?
Cheers
1 - I already have add Min / Max heigh zone. Some pairs performed best with it.
2 - I have done similary test with ADR(14), but I will try with simple last W1 candle.
My best version (V9) for EURJPY : not so bad :
You do not have the required permissions to view the files attached to this post.
-
michalkraus
- Trader
- Posts: 22
- Joined: Sun Sep 02, 2012 2:29 pm
Re: Brakeout of the monday's night
Awesome work, I feel like you are getting really close to the best possible resultsphil_trade wrote:HelloSpiderX wrote:Hi Phil,
I just recalled that i have read about a similar strategy to this before.
There are some additional rules for this:
1. Zone must be minimum n pips. (80-90 pips, have to optimize)
2. Previous week should have strong directional movement and only trade in the previous week's direction.
(My guess: Assume that this means that previous weekly candle has short wick and long body relative to the wick, body length minimum x pips, or maybe some function of ATR ?)
The end result should be fewer setups, but higher probability wins.
Can you try this out ?
Cheers
1 - I already have add Min / Max heigh zone. Some pairs performed best with it.
2 - I have done similary test with ADR(14), but I will try with simple last W1 candle.
My best version (V9) for EURJPY : not so bad :
-
phil_trade
Re: Brakeout of the monday's night
Hello Michal and Tommaso
Now the strategy is OK for EURJPY, so please find below the FT code to translate into MQL.
Feel free to contact me if more explanation needed.
cheers
Philippe
1 - Code to detect Monday Zone
2 - Code to store High/Low MZBO
3 - Code to set Pending Trade and Trace zone on graph
4 - Code to Close Live Order and Delete Pending Order on Friday
5 - Code to Move SL when TP or When Delta pips Zone achieved
EURJPY Benchmark 2008 - 2013 for MZBO strategy
Now the strategy is OK for EURJPY, so please find below the FT code to translate into MQL.
Feel free to contact me if more explanation needed.
cheers
Philippe
1 - Code to detect Monday Zone
Code: Select all
// Sommes-nous dans la zone Lundi 00H à 09H
MonJour := DayOfTheWeek(TimeCurrent);
MonHeure := HourOf(Timecurrent);
if (MonJour = 1) and (MonHeure < HeureFinDeMondayZone[PointeurPaire]) then
begin
// Nettoyer tableaux de High/Low
HighMondayZone[PointeurPaire] := 0;
LowMondayZone[PointeurPaire] := 0;
FlagTraceRectangle[PointeurPaire] := 0;
// sortir en attente fin de création de la zone
exit;
end; // if (MonJour = 1) and (MonHeure < HeureFinDeMondayZone[PointeurPaire]) then
2 - Code to store High/Low MZBO
Code: Select all
// Fin de création de la zone -> Mémoriser les niveaux
if (MonJour = 1) and (MonHeure = HeureFinDeMondayZone[PointeurPaire]) and (LowMondayZone[PointeurPaire] = 0) then
begin
HighMondayZone[PointeurPaire] := 0;
LowMondayZone[PointeurPaire] := 99999999;
for i := HeureFinDeMondayZone[PointeurPaire] downto 0 do
begin
MonHigh := iHigh(PaireDevise[PointeurPaire],period_H1,i);
if MonHigh > HighMondayZone[PointeurPaire] then HighMondayZone[PointeurPaire] := MonHigh ;
MonLow := iLow(PaireDevise[PointeurPaire],period_H1,i);
if MonLow < LowMondayZone[PointeurPaire] then LowMondayZone[PointeurPaire] := MonLow ;
end; // for i := 0 to HeureFinDeMondayZone[PointeurPaire]-1 do
end; // if (MonJour = 1) and (MonHeure < HeureFinDeMondayZone[PointeurPaire]) then
Code: Select all
// Pose des trades en break de zone up et down
if (MonJour = 1) and (MonHeure = HeureFinDeMondayZone[PointeurPaire]) and (LowMondayZone[PointeurPaire] > 0) and (FlagTraceRectangle[PointeurPaire] = 0)then
begin
SetCurrencyAndTimeframe(PaireDevise[PointeurPaire], 1);
MonBid := RoundTo(Bid, -Digits);
MonPoint := Point;
// Trace la Zone de Monday Break OUT et contrôle le % de taille / ADR(14)
if EnOptimisation = 0 then
begin
ObjectsDeleteAll(0,obj_HLine);
MonTemps1 := iTime(PaireDevise[PointeurPaire],Period_H1,HeureFinDeMondayZone[PointeurPaire]) ;
MonTemps2 := iTime(PaireDevise[PointeurPaire],Period_H1,1);
TailleZone := abs((HighMondayZone[PointeurPaire] - LowMondayZone[PointeurPaire]));
ADR_D1_Value[PointeurPaire] :=0;
for i := 1 to 14 do
begin
MonHigh := iHigh(PaireDevise[PointeurPaire], Period_D1, i);
MonLow := iLow (PaireDevise[PointeurPaire], Period_D1, i);
MaTaille := (MonHigh - MonLow) / MonPoint;
ADR_D1_Value[PointeurPaire] := ADR_D1_Value[PointeurPaire] + MaTaille ;
end;
ADR_D1_Value[PointeurPaire] := ADR_D1_Value[PointeurPaire] / 14;
if (TailleZone/MonPoint) > (ADR_D1_Value[PointeurPaire] * 0.50) then
begin
CouleurRectangle := clRED;
NbTailleZoneSupADR[PointeurPaire] := NbTailleZoneSupADR[PointeurPaire] + 1;
AfficheOnGraph(PaireDevise[PointeurPaire],'Ratio MZBO/ADR',
' MZBO > ADR = '+MaValeurToStr(NbTailleZoneSupADR[PointeurPaire],0)+' / MZBO < ADR = '+MaValeurToStr(NbTailleZoneInfADR[PointeurPaire],0)
,clYellow,200,20);
end
else
begin
CouleurRectangle := clGREEN;
NbTailleZoneInfADR[PointeurPaire] := NbTailleZoneInfADR[PointeurPaire] + 1;
AfficheOnGraph(PaireDevise[PointeurPaire],'Ratio MZBO/ADR',
' MZBO > ADR = '+MaValeurToStr(NbTailleZoneSupADR[PointeurPaire],0)+' / MZBO < ADR = '+MaValeurToStr(NbTailleZoneInfADR[PointeurPaire],0)
,clYellow,200,20);
end;
TraceRectangle(PaireDevise[PointeurPaire], HighMondayZone[PointeurPaire],MonTemps1,LowMondayZone[PointeurPaire],MonTemps2, CouleurRectangle,
'MZBO Taille '+MaValeurToStr(TailleZone/MonPoint,0)+' / ADR '+MaValeurToStr(ADR_D1_Value[PointeurPaire],0)+
' / Ratio '+MaValeurToStr( ((TailleZone/MonPoint) / ADR_D1_Value[PointeurPaire] ) *100 ,2),0 );
TraceHLigne(PaireDevise[PointeurPaire] ,Period_H1, HighMondayZone[PointeurPaire] + (ADR_D1_Value[PointeurPaire] * MonPoint),clGreen,psDot,'TP1',0);
TraceHLigne(PaireDevise[PointeurPaire] ,Period_H1, LowMondayZone[PointeurPaire] - (ADR_D1_Value[PointeurPaire] * MonPoint),clRed,psDot,'TP2',0);
FlagTraceRectangle[PointeurPaire] := 1;
end;
TailleZone := abs((HighMondayZone[PointeurPaire] - LowMondayZone[PointeurPaire]));
if (TailleZone >= TailleZoneMini[PointeurPaire] * MonPoint) and (TailleZone <= TailleZoneMaxi[PointeurPaire] * MonPoint)then
begin
if (IsThereNoActiveTrade(PaireDevise[PointeurPaire],tp_buy,0) = 0) and (IsThereNoActiveTrade(PaireDevise[PointeurPaire],tp_sell,0) = 0) then
begin
if IsThisDeviseTradable(PaireDevise[PointeurPaire],0,0,0,999999) = 0 then
begin
NbLot := Nbre_Lot_Debut/3;
MonPrixLimite := HighMondayZone[PointeurPaire] + (DeltaPipsToTakeTradeOnMondayZoneBreak[PointeurPaire] * MonPoint);
if (MonPrixLimite - MonBid < 5 * MonPoint) then MonPrixLimite := MonPrixLimite + (5*MonPoint) ;
NewSL := LowMondayZone[PointeurPaire] - (DeltaPipsToAddSLOnMondayZone[PointeurPaire] * MonPoint) - ((SL_Multiplier[PointeurPaire]) * (abs(HighMondayZone[PointeurPaire] - LowMondayZone[PointeurPaire])));
NewTP := HighMondayZone[PointeurPaire] + ((1 * TP_Multiplier[PointeurPaire]) * ((HighMondayZone[PointeurPaire] - LowMondayZone[PointeurPaire])));
SendPendingOrder( PaireDevise[PointeurPaire], op_BuyStop, NbLot , NewSL, NewTP ,MonPrixLimite ,'', MagicNumber1 , OrderHandle) ;
NewTP := HighMondayZone[PointeurPaire] + ((2 * TP_Multiplier[PointeurPaire]) * ((HighMondayZone[PointeurPaire] - LowMondayZone[PointeurPaire])));
SendPendingOrder( PaireDevise[PointeurPaire], op_BuyStop, NbLot , NewSL, NewTP ,MonPrixLimite ,'', MagicNumber2 , OrderHandle) ;
if FixedTPforTrade3[PointeurPaire]=1 then
begin
NewTP := HighMondayZone[PointeurPaire] + ((3 * TP_Multiplier[PointeurPaire]) * ((HighMondayZone[PointeurPaire] - LowMondayZone[PointeurPaire])));
end
else
begin
NewTP := 0;
end;
SendPendingOrder( PaireDevise[PointeurPaire], op_BuyStop, NbLot , NewSL, NewTP ,MonPrixLimite ,'', MagicNumber3 , OrderHandle) ;
end; // if IsThisDeviseTradable(PaireDevise[PointeurPaire],0,0,0,999999) = 0 then
if IsThisDeviseTradable(PaireDevise[PointeurPaire],1,0,0,999999) = 0 then
begin
NbLot := Nbre_Lot_Debut/3;
MonPrixLimite := LowMondayZone[PointeurPaire] - (DeltaPipsToTakeTradeOnMondayZoneBreak[PointeurPaire] * MonPoint);
if (MonBid - MonPrixLimite < 5 * MonPoint) then MonPrixLimite := MonPrixLimite - (5*MonPoint) ;
NewSL := HighMondayZone[PointeurPaire] + (DeltaPipsToAddSLOnMondayZone[PointeurPaire] * MonPoint) + ((SL_Multiplier[PointeurPaire]) * (abs(HighMondayZone[PointeurPaire] - LowMondayZone[PointeurPaire])));
NewTP := LowMondayZone[PointeurPaire] - ((1 * TP_Multiplier[PointeurPaire]) * ((HighMondayZone[PointeurPaire] - LowMondayZone[PointeurPaire])));
SendPendingOrder( PaireDevise[PointeurPaire], op_SellStop, NbLot , NewSL, NewTP ,MonPrixLimite ,'', MagicNumber1 , OrderHandle) ;
NewTP := LowMondayZone[PointeurPaire] - ((2 * TP_Multiplier[PointeurPaire]) * ((HighMondayZone[PointeurPaire] - LowMondayZone[PointeurPaire])));
SendPendingOrder( PaireDevise[PointeurPaire], op_SellStop, NbLot , NewSL, NewTP ,MonPrixLimite ,'', MagicNumber2 , OrderHandle) ;
if FixedTPforTrade3[PointeurPaire]=1 then
begin
NewTP := LowMondayZone[PointeurPaire] - ((3 * TP_Multiplier[PointeurPaire]) * ((HighMondayZone[PointeurPaire] - LowMondayZone[PointeurPaire])));
end
else
begin
NewTP := 0;
end;
SendPendingOrder( PaireDevise[PointeurPaire], op_SellStop, NbLot , NewSL, NewTP ,MonPrixLimite ,'', MagicNumber3 , OrderHandle) ;
end; // if IsThisDeviseTradable(PaireDevise[PointeurPaire],1,0,0,999999) = 0 then
end; // if IsThereNoActiveTrade(PaireDevise[PointeurPaire],0) = 0 then
end; // if (TailleZone >= TailleZoneMini[j] * MonPoint) and (TailleZone <= TailleZoneMaxi[j] * MonPoint)then
end; // if (MonJour = 1) and (MonHeure = HeureFinDeMondayZone[PointeurPaire]) and (LowMondayZone[PointeurPaire] > 0) then
4 - Code to Close Live Order and Delete Pending Order on Friday
Code: Select all
// Vendredi 21H -> Close all pour nouvelle semaine
MonJour := DayOfTheWeek(TimeCurrent);
MonHeure := HourOf(Timecurrent);
if (MonJour = 5) and (MonHeure >= 20) then
begin
DeletePendingSell(PaireDevise[j],OrderTicket);
DeletePendingBuy(PaireDevise[j],OrderTicket);
FermeTradeDevise(PaireDevise[j],tp_sell,0,999999);
FermeTradeDevise(PaireDevise[j],tp_buy,0,999999);
// Exporte trade pour analyse
WriteTrade;
end;Code: Select all
// Approche ou Touché de TP1 ********************************************************************************************************************
if (OrderType = tp_buy) then
begin
// si TP1 touché Move SL = OPEN
if (PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j] = 0) then
begin
if (IsThereNoActiveTrade(PaireDevise[j],tp_buy,MonTicket) = 2) then
begin
TailleZone := abs(((1 * TP_Multiplier[j]) *(HighMondayZone[j] - LowMondayZone[j])));
NewSL := OrderOpenPrice ;
if (Abs(MonBid - NewSL) > 5*MonPoint) and (Abs(NewSL - OrderStopLoss) > 10*MonPoint) and (NewSL > OrderStopLoss) and (NewSL < MonBid) then
begin
ModifyOrder(OrderTicket,OrderOpenPrice,NewSL,OrderTakeProfit);
end;
end; // if (IsThereNoActiveTrade(PaireDevise[j],tp_buy,MonTicket) = 2) then
end
else
begin
// si % TailleZone parcourue -> Move SL + %TailleZone
TailleZone := abs(((1 * TP_Multiplier[j]) *(HighMondayZone[j] - LowMondayZone[j])));
if (MonBid - OrderOpenPrice) >= (TailleZone * PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j]) then
begin
NewSL := OrderOpenPrice + (TailleZone * PourcentageTailleZoneToPutSLBeforeTpHit[j]);
if (Abs(MonBid - NewSL) > 5*MonPoint) and (Abs(NewSL - OrderStopLoss) > 10*MonPoint) and (NewSL > OrderStopLoss) and (NewSL < MonBid) then
begin
ModifyOrder(OrderTicket,OrderOpenPrice,NewSL,OrderTakeProfit);
end;
end;
end; // if (PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j] = 0) then
end; // if (OrderType = tp_buy) then
if (OrderType = tp_sell) then
begin
// si TP1 touché Move SL = OPEN
if (PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j] = 0) then
begin
if (IsThereNoActiveTrade(PaireDevise[j],tp_sell,MonTicket) = 2) then
begin
TailleZone := abs(((1 * TP_Multiplier[j]) *(HighMondayZone[j] - LowMondayZone[j])));
NewSL := OrderOpenPrice ;
if (Abs(NewSL - MonBid) > 5*MonPoint) and (Abs(NewSL - OrderStopLoss) > 10*MonPoint) and (NewSL < OrderStopLoss) and (NewSL > MonBid) then
begin
ModifyOrder(OrderTicket,OrderOpenPrice,NewSL,OrderTakeProfit);
end;
end; // if (IsThereNoActiveTrade(PaireDevise[j],tp_buy,MonTicket) = 2) then
end
else
begin
// si % TailleZone parcourue -> Move SL = OPEN + %TailleZone
TailleZone := abs(((1 * TP_Multiplier[j]) *(HighMondayZone[j] - LowMondayZone[j])));
if (OrderOpenPrice - MonBid) >= (TailleZone * PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j]) then
begin
NewSL := OrderOpenPrice - (TailleZone * PourcentageTailleZoneToPutSLBeforeTpHit[j]);
if (Abs(NewSL - MonBid) > 5*MonPoint) and (Abs(NewSL - OrderStopLoss) > 10*MonPoint) and (NewSL < OrderStopLoss) and (NewSL > MonBid) then
begin
ModifyOrder(OrderTicket,OrderOpenPrice,NewSL,OrderTakeProfit);
end;
end;
end; // if (PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j] = 0) then
end; // if (OrderType = tp_sell) then
// Approche ou Touché de TP1 ********************************************************************************************************************
// Approche ou Touché de TP2 ********************************************************************************************************************
if (OrderType = tp_buy) then
begin
// si TP1 touché Move SL = OPEN
if (PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j] = 0) then
begin
if (IsThereNoActiveTrade(PaireDevise[j],tp_buy,MonTicket) = 1) then
begin
TailleZone := abs(((2 * TP_Multiplier[j]) *(HighMondayZone[j] - LowMondayZone[j])));
NewSL := OrderOpenPrice + TailleZone ;
if (Abs(MonBid - NewSL) > 5*MonPoint) and (Abs(NewSL - OrderStopLoss) > 10*MonPoint) and (NewSL > OrderStopLoss) and (NewSL < MonBid) then
begin
ModifyOrder(OrderTicket,OrderOpenPrice,NewSL,OrderTakeProfit);
end;
end; // if (IsThereNoActiveTrade(PaireDevise[j],tp_buy,MonTicket) = 2) then
end
else
begin
// si % TailleZone parcourue -> Move SL + %TailleZone
TailleZone := abs(((2 * TP_Multiplier[j]) *(HighMondayZone[j] - LowMondayZone[j])));
if (MonBid - OrderOpenPrice) >= (TailleZone * PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j]) then
begin
NewSL := OrderOpenPrice + (TailleZone * PourcentageTailleZoneToPutSLBeforeTpHit[j] * 2);
if (Abs(MonBid - NewSL) > 5*MonPoint) and (Abs(NewSL - OrderStopLoss) > 10*MonPoint) and (NewSL > OrderStopLoss) and (NewSL < MonBid) then
begin
ModifyOrder(OrderTicket,OrderOpenPrice,NewSL,OrderTakeProfit);
end;
end;
end; // if (PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j] = 0) then
end; // if (OrderType = tp_buy) then
if (OrderType = tp_sell) then
begin
// si TP1 touché Move SL = OPEN
if (PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j] = 0) then
begin
if (IsThereNoActiveTrade(PaireDevise[j],tp_sell,MonTicket) = 1) then
begin
TailleZone := abs(((2 * TP_Multiplier[j]) *(HighMondayZone[j] - LowMondayZone[j])));
NewSL := OrderOpenPrice - TailleZone ;
if (Abs(NewSL - MonBid) > 5*MonPoint) and (Abs(NewSL - OrderStopLoss) > 10*MonPoint) and (NewSL < OrderStopLoss) and (NewSL > MonBid) then
begin
ModifyOrder(OrderTicket,OrderOpenPrice,NewSL,OrderTakeProfit);
end;
end; // if (IsThereNoActiveTrade(PaireDevise[j],tp_buy,MonTicket) = 2) then
end
else
begin
// si % TailleZone parcourue -> Move SL = OPEN + %TailleZone
TailleZone := abs(((2 * TP_Multiplier[j]) *(HighMondayZone[j] - LowMondayZone[j])));
if (OrderOpenPrice - MonBid) >= (TailleZone * PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j]) then
begin
NewSL := OrderOpenPrice - (TailleZone * PourcentageTailleZoneToPutSLBeforeTpHit[j] * 2);
if (Abs(NewSL - MonBid) > 5*MonPoint) and (Abs(NewSL - OrderStopLoss) > 10*MonPoint) and (NewSL < OrderStopLoss) and (NewSL > MonBid) then
begin
ModifyOrder(OrderTicket,OrderOpenPrice,NewSL,OrderTakeProfit);
end;
end;
end; // if (PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j] = 0) then
end; // if (OrderType = tp_sell) then
// Approche ou Touché de TP2 ********************************************************************************************************************
// Approche TP3 ********************************************************************************************************************
if (PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j] > 0) then
begin
if (OrderType = tp_buy) then
begin
// si % TailleZone parcourue -> Move SL + %TailleZone
TailleZone := abs(((3 * TP_Multiplier[j]) *(HighMondayZone[j] - LowMondayZone[j])));
if (MonBid - OrderOpenPrice) >= (TailleZone * PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j]) then
begin
NewSL := OrderOpenPrice + (TailleZone * PourcentageTailleZoneToPutSLBeforeTpHit[j] * 3);
if (Abs(MonBid - NewSL) > 5*MonPoint) and (Abs(NewSL - OrderStopLoss) > 10*MonPoint) and (NewSL > OrderStopLoss) and (NewSL < MonBid) then
begin
ModifyOrder(OrderTicket,OrderOpenPrice,NewSL,OrderTakeProfit);
end;
end;
end; // if (OrderType = tp_buy) then
if (OrderType = tp_sell) then
begin
// si % TailleZone parcourue -> Move SL = OPEN + %TailleZone
TailleZone := abs(((3 * TP_Multiplier[j]) *(HighMondayZone[j] - LowMondayZone[j])));
if (OrderOpenPrice - MonBid) >= (TailleZone * PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j] * 3) then
begin
NewSL := OrderOpenPrice - (TailleZone * PourcentageTailleZoneToPutSLBeforeTpHit[j]);
if (Abs(NewSL - MonBid) > 5*MonPoint) and (Abs(NewSL - OrderStopLoss) > 10*MonPoint) and (NewSL < OrderStopLoss) and (NewSL > MonBid) then
begin
ModifyOrder(OrderTicket,OrderOpenPrice,NewSL,OrderTakeProfit);
end;
end;
end; // if (OrderType = tp_sell) then
end; // if (PourcentageTailleZoneToDecideToMoveSLBeforeTpHit[j] > 0) thenEURJPY Benchmark 2008 - 2013 for MZBO strategy
You do not have the required permissions to view the files attached to this post.
- milanese
- TechAdmin
- Posts: 3293
- Joined: Wed Jan 09, 2013 9:02 am
- Location: btr rdx, r8 +
Re: Brakeout of the monday's night
Hi Philippe and Michal,phil_trade wrote:Hello Michal and Tommaso
Now the strategy is OK for EURJPY, so please find below the FT code to translate into MQL.
Feel free to contact me if more explanation needed.
cheers
Philippe
got the code and I will try to create the mq4 EA...
Cheers and have a great week
Tommaso
Global Prime is the official SHF broker 
Searching for Servers and Workstations with individual configuration?
Just PM
Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
Searching for Servers and Workstations with individual configuration?
Just PM
NOTE: Cookies and JavaScript are required for the using the board, with full functionality