New module to add to Empty4 version : MACD Main/Signal Take Profit. This allow smoother result and add GBPUSD to 7 bases pairs :
It take profit when MACD main reach a parameter value MACD_UseCloseTradeWithMACDlevel and when MACD main < MACD Signal with a minimum delta pips and if a minimum profit is achieved
In the close module code :
Ft code to translate :
Code: Select all
// Close on MACD MAIN MAX / MACD SIGNAL
if (MonProfitPips > GainPipsMinimumToClose[j]) and (MACD_UseCloseTradeWithMACDlevel[j] > 0) and (PaireMACD_D1Main[j,1] > MACD_UseCloseTradeWithMACDlevel[j]) and
(PaireMACD_D1Signal[j,1] > PaireMACD_D1Main[j,1]) and (PaireMACD_D1Signal[j,1] - PaireMACD_D1Main[j,1] > DeltaPipsInterMainSignal[j]*Point) and
(OrderType = tp_buy) then
begin
FermeTradeDevise(PaireDevise[j],tp_buy,0,999999);
Lprint(PaireDevise[j]+' -> Close sur MACD Main Max Level atteint et < Signal ->' +MaValeurToStr(PaireMACD_D1Signal[j,1] ,Digits)+'/'+MaValeurToStr(PaireMACD_D1Main[j,1] ,Digits));
exit;
end; //if (OrderType = tp_buy) then
if (MonProfitPips > GainPipsMinimumToClose[j]) and (MACD_UseCloseTradeWithMACDlevel[j] > 0) and (PaireMACD_D1Main[j,1] < -MACD_UseCloseTradeWithMACDlevel[j]) and
(PaireMACD_D1Main[j,1] > PaireMACD_D1Signal[j,1]) and (PaireMACD_D1Main[j,1] - PaireMACD_D1Signal[j,1] > DeltaPipsInterMainSignal[j]*Point) and
(OrderType = tp_sell) then
begin
FermeTradeDevise(PaireDevise[j],tp_sell,0,999999);
Lprint(PaireDevise[j]+' -> Close sur MACD Main MAx Level atteint et > Signal ->' +MaValeurToStr(PaireMACD_D1Signal[j,1] ,Digits)+'/'+MaValeurToStr(PaireMACD_D1Main[j,1] ,Digits));
exit;
end; //if (OrderType = tp_sell) thenfor sell
Code: Select all
regle13 := (MACD_UseFilterTradeWithMACDlevel[kk] = 0) or (PaireMACD_D1Main[kk,1] > -MACD_UseFilterTradeWithMACDlevel[kk]);Code: Select all
regle13 := (MACD_UseFilterTradeWithMACDlevel[kk] = 0) or (PaireMACD_D1Main[kk,1] < MACD_UseFilterTradeWithMACDlevel[kk]);