Simbasystem-gbpusd - page 56

 

Pilofe

Hi Angelo,

Please find below the attachment with the full period test resuslts and my settings..let`s see if you can reproduce or not the results..

Thanks

Simba

My settings :

+------------------------------------------------------------------+

//| SimbaSystem.mq4 |

//| Simba, programmed by Malcik |

//| https://www.mql5.com/en/forum |

//+------------------------------------------------------------------+

#property copyright "Simba, programmed by Malcik"

#property link "https://www.forex-tsd.com"

#define MAGICSS 20070129

extern datetime NewsTime;

extern int MA_Type=1;

extern int JMA_HMA_Period=10;

extern double JMA_Phase=0;

datetime LastMinute;

int LongTrades=0;

int ShortTrades=0;

double LastBuyPrice=0;

double LastSellPrice=0;

//+------------------------------------------------------------------+

//| expert initialization function |

//+------------------------------------------------------------------+

int init()

{

//----

//----

return(0);

}

//+------------------------------------------------------------------+

//| expert deinitialization function |

//+------------------------------------------------------------------+

int deinit()

{

//----

//----

return(0);

}

//+------------------------------------------------------------------+

//| expert start function |

//+------------------------------------------------------------------+

int start()

{

double SATL; //=iCustom(NULL,PERIOD_H4,"SATL",0,1);

double SATL_Prev; //iCustom(NULL,PERIOD_H4,"SATL",0,2);

double Chandelier_Up=iCustom(NULL,PERIOD_H1,"ChandelierStops_v1",0,1);

double Chandelier_Dn=iCustom(NULL,PERIOD_H1,"ChandelierStops_v1",1,1);

double WPR=iWPR(NULL,0,90,1);

int res;

//----

if(MA_Type==1)

{

SATL=iCustom(NULL,PERIOD_H4,"SATL",0,1);

SATL_Prev=iCustom(NULL,PERIOD_H4,"SATL",0,2);

}

if(MA_Type==2)

{

SATL=iCustom(NULL,PERIOD_H4,"HMA",JMA_HMA_Period,0,1);

SATL_Prev=iCustom(NULL,PERIOD_H4,"HMA",JMA_HMA_Period,0,2);

}

if(MA_Type==3)

{

SATL=iCustom(NULL,PERIOD_H4,"JMA",JMA_HMA_Period,JMA_Phase,0,1);

SATL_Prev=iCustom(NULL,PERIOD_H4,"JMA",JMA_HMA_Period,JMA_Phase,0,2);

}

if(OrdersTotal()>0)

{

for(int i=0;i<OrdersTotal();i++)

{

if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))

if(OrderSymbol()==Symbol() && OrderMagicNumber()==MAGICSS)

{

if(OrderType()==OP_BUY)

{

if(SATL=Time[0] && NewsTime-Time[0]<=300))

{

OrderClose(OrderTicket(),OrderLots(),Bid,3,White);

}

}

if(OrderType()==OP_SELL)

{

if(SATL>SATL_Prev || (Chandelier_Up!=EMPTY_VALUE && Chandelier_Dn==EMPTY_VALUE) || (NewsTime>=Time[0] && NewsTime-Time[0]<=300))

{

OrderClose(OrderTicket(),OrderLots(),Ask,3,White);

}

}

}

}

for(i=0;i<OrdersTotal();i++)

{

if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))

if(OrderSymbol()==Symbol() && OrderMagicNumber()==MAGICSS)

{

if(OrderType()==OP_BUY)

{

if(OrderStopLoss()<Chandelier_Up-Point)OrderModify(OrderTicket(),OrderOpenPrice(),Chandelier_Up-Point,OrderTakeProfit(),0,Green);

}

if(OrderType()==OP_SELL)

{

if(OrderStopLoss()>Chandelier_Dn+Point+Point*4)OrderModify(OrderTicket(),OrderOpenPrice(),Chandelier_Dn+Point+Point*4,OrderTakeProfit(),0,Green);

}

}

}

}

if(LastMinute!=Time[0])

{

if(SATL=-5)LongTrades=0;

if(SATL>=SATL_Prev || Chandelier_Dn==EMPTY_VALUE || WPR<=-95)ShortTrades=0;

if(LongTrades==0 || Close[0]<=LastBuyPrice-50*Point)

{

if(SATL>SATL_Prev && Close[0]>=SATL && Chandelier_Up!=EMPTY_VALUE && Chandelier_Dn==EMPTY_VALUE && Close[0]>=Chandelier_Up+10*Point && Close[0]<=Chandelier_Up+50*Point && WPR=Time[0] && NewsTime-Time[0]>1800) || (NewsTime=600)))// && TimeDayOfWeek(Time[0])<5)))

{

res=OrderSend(Symbol(),OP_BUY,1,Ask,3,Chandelier_Up-Point,Bid+(1000*Point),"SimbaSystemM1",MAGICSS,0,Green);

LongTrades++;

LastBuyPrice=Bid;

}

}

if(ShortTrades==0 || Close[0]>=LastSellPrice+50*Point)

{

if(SATL<SATL_Prev && Close[0]<=SATL && Chandelier_Up==EMPTY_VALUE && Chandelier_Dn!=EMPTY_VALUE && Close[0]=Chandelier_Dn-50*Point && WPR>=-5 && ((NewsTime>=Time[0] && NewsTime-Time[0]>1800) || (NewsTime=600)))// && TimeDayOfWeek(Time[0])<5)))

{

res=OrderSend(Symbol(),OP_SELL,1,Bid,3,Chandelier_Dn+Point+Point*4,Ask-(1000*Point),"SimbaSystemM1",MAGICSS,0,Red);

ShortTrades++;

LastSellPrice=Bid;

}

}

LastMinute=Time[0];

}

//----

return(0);

}

//+------------------------------------------------------------------+

Files:
 

Malcik,Pilofe

Hi,

Same test but without Malcik conditions,so,instead of Chand distance from price between 10 and 50,between 1 and 200..better results..please see attached settings and results..please try to replicate/disprove

Regards

Simba

{

if(SATL>SATL_Prev && Close[0]>=SATL && Chandelier_Up!=EMPTY_VALUE && Chandelier_Dn==EMPTY_VALUE && Close[0]>=Chandelier_Up+1*Point && Close[0]<=Chandelier_Up+200*Point&& WPR=Time[0] && NewsTime-Time[0]>1800) || (NewsTime=600)))// && TimeDayOfWeek(Time[0])<5)))

{

res=OrderSend(Symbol(),OP_BUY,1,Ask,3,Chandelier_Up-Point,Bid+(1000*Point),"SimbaSystemM1",MAGICSS,0,Green);

LongTrades++;

LastBuyPrice=Bid;

}

}

if(ShortTrades==0 || Close[0]>=LastSellPrice+50*Point)

{

if(SATL<SATL_Prev && Close[0]<=SATL && Chandelier_Up==EMPTY_VALUE && Chandelier_Dn!=EMPTY_VALUE && Close[0]<=Chandelier_Dn-1*Point && Close[0]>=Chandelier_Dn-200*Point && WPR>=-5 && ((NewsTime>=Time[0] && NewsTime-Time[0]>1800) || (NewsTime=600)))// && TimeDayOfWeek(Time[0])<5)))

{

res=OrderSend(Symbol(),OP_SELL,1,Bid,3,Chandelier_Dn+Point+Point*4,Ask-(1000*Point),"SimbaSystemM1",MAGICSS,0,Red);

 

Tests

SIMBA:
Hi Angelo,

Please find below the attachment with the full period test resuslts and my settings..let`s see if you can reproduce or not the results..

Thanks

Simba

My settings :

+------------------------------------------------------------------+

//| SimbaSystem.mq4 |

//| Simba, programmed by Malcik |

//| https://www.mql5.com/en/forum |

//+------------------------------------------------------------------+

#property copyright "Simba, programmed by Malcik"

#property link "https://www.forex-tsd.com"

#define MAGICSS 20070129

extern datetime NewsTime;

extern int MA_Type=1;

extern int JMA_HMA_Period=10;

extern double JMA_Phase=0;

datetime LastMinute;

int LongTrades=0;

int ShortTrades=0;

double LastBuyPrice=0;

double LastSellPrice=0;

//+------------------------------------------------------------------+

//| expert initialization function |

//+------------------------------------------------------------------+

int init()

{

//----

//----

return(0);

}

//+------------------------------------------------------------------+

//| expert deinitialization function |

//+------------------------------------------------------------------+

int deinit()

{

//----

//----

return(0);

}

//+------------------------------------------------------------------+

//| expert start function |

//+------------------------------------------------------------------+

int start()

{

double SATL; //=iCustom(NULL,PERIOD_H4,"SATL",0,1);

double SATL_Prev; //iCustom(NULL,PERIOD_H4,"SATL",0,2);

double Chandelier_Up=iCustom(NULL,PERIOD_H1,"ChandelierStops_v1",0,1);

double Chandelier_Dn=iCustom(NULL,PERIOD_H1,"ChandelierStops_v1",1,1);

double WPR=iWPR(NULL,0,90,1);

int res;

//----

if(MA_Type==1)

{

SATL=iCustom(NULL,PERIOD_H4,"SATL",0,1);

SATL_Prev=iCustom(NULL,PERIOD_H4,"SATL",0,2);

}

if(MA_Type==2)

{

SATL=iCustom(NULL,PERIOD_H4,"HMA",JMA_HMA_Period,0,1);

SATL_Prev=iCustom(NULL,PERIOD_H4,"HMA",JMA_HMA_Period,0,2);

}

if(MA_Type==3)

{

SATL=iCustom(NULL,PERIOD_H4,"JMA",JMA_HMA_Period,JMA_Phase,0,1);

SATL_Prev=iCustom(NULL,PERIOD_H4,"JMA",JMA_HMA_Period,JMA_Phase,0,2);

}

if(OrdersTotal()>0)

{

for(int i=0;i<OrdersTotal();i++)

{

if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))

if(OrderSymbol()==Symbol() && OrderMagicNumber()==MAGICSS)

{

if(OrderType()==OP_BUY)

{

if(SATL=Time[0] && NewsTime-Time[0]<=300))

{

OrderClose(OrderTicket(),OrderLots(),Bid,3,White);

}

}

if(OrderType()==OP_SELL)

{

if(SATL>SATL_Prev || (Chandelier_Up!=EMPTY_VALUE && Chandelier_Dn==EMPTY_VALUE) || (NewsTime>=Time[0] && NewsTime-Time[0]<=300))

{

OrderClose(OrderTicket(),OrderLots(),Ask,3,White);

}

}

}

}

for(i=0;i<OrdersTotal();i++)

{

if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))

if(OrderSymbol()==Symbol() && OrderMagicNumber()==MAGICSS)

{

if(OrderType()==OP_BUY)

{

if(OrderStopLoss()<Chandelier_Up-Point)OrderModify(OrderTicket(),OrderOpenPrice(),Chandelier_Up-Point,OrderTakeProfit(),0,Green);

}

if(OrderType()==OP_SELL)

{

if(OrderStopLoss()>Chandelier_Dn+Point+Point*4)OrderModify(OrderTicket(),OrderOpenPrice(),Chandelier_Dn+Point+Point*4,OrderTakeProfit(),0,Green);

}

}

}

}

if(LastMinute!=Time[0])

{

if(SATL=-5)LongTrades=0;

if(SATL>=SATL_Prev || Chandelier_Dn==EMPTY_VALUE || WPR<=-95)ShortTrades=0;

if(LongTrades==0 || Close[0]<=LastBuyPrice-50*Point)

{

if(SATL>SATL_Prev && Close[0]>=SATL && Chandelier_Up!=EMPTY_VALUE && Chandelier_Dn==EMPTY_VALUE && Close[0]>=Chandelier_Up+10*Point && Close[0]<=Chandelier_Up+50*Point && WPR=Time[0] && NewsTime-Time[0]>1800) || (NewsTime=600)))// && TimeDayOfWeek(Time[0])<5)))

{

res=OrderSend(Symbol(),OP_BUY,1,Ask,3,Chandelier_Up-Point,Bid+(1000*Point),"SimbaSystemM1",MAGICSS,0,Green);

LongTrades++;

LastBuyPrice=Bid;

}

}

if(ShortTrades==0 || Close[0]>=LastSellPrice+50*Point)

{

if(SATL<SATL_Prev && Close[0]<=SATL && Chandelier_Up==EMPTY_VALUE && Chandelier_Dn!=EMPTY_VALUE && Close[0]=Chandelier_Dn-50*Point && WPR>=-5 && ((NewsTime>=Time[0] && NewsTime-Time[0]>1800) || (NewsTime=600)))// && TimeDayOfWeek(Time[0])<5)))

{

res=OrderSend(Symbol(),OP_SELL,1,Bid,3,Chandelier_Dn+Point+Point*4,Ask-(1000*Point),"SimbaSystemM1",MAGICSS,0,Red);

ShortTrades++;

LastSellPrice=Bid;

}

}

LastMinute=Time[0];

}

//----

return(0);

}

//+------------------------------------------------------------------+

Hi Simba,

I copied your code and I made the tests with it.

The results had been very next. Disdain the difference, therefore we can have different versions of the MT4.

Mine it is the MT4 Alpari Build 201.

What you think?

Thanks...

Angelo

 

Tests

SIMBA:
Hi,

Same test but without Malcik conditions,so,instead of Chand distance from price between 10 and 50,between 1 and 200..better results..please see attached settings and results..please try to replicate/disprove

Regards

Simba

{

if(SATL>SATL_Prev && Close[0]>=SATL && Chandelier_Up!=EMPTY_VALUE && Chandelier_Dn==EMPTY_VALUE && Close[0]>=Chandelier_Up+1*Point && Close[0]<=Chandelier_Up+200*Point&& WPR=Time[0] && NewsTime-Time[0]>1800) || (NewsTime=600)))// && TimeDayOfWeek(Time[0])<5)))

{

res=OrderSend(Symbol(),OP_BUY,1,Ask,3,Chandelier_Up-Point,Bid+(1000*Point),"SimbaSystemM1",MAGICSS,0,Green);

LongTrades++;

LastBuyPrice=Bid;

}

}

if(ShortTrades==0 || Close[0]>=LastSellPrice+50*Point)

{

if(SATL<SATL_Prev && Close[0]<=SATL && Chandelier_Up==EMPTY_VALUE && Chandelier_Dn!=EMPTY_VALUE && Close[0]<=Chandelier_Dn-1*Point && Close[0]>=Chandelier_Dn-200*Point && WPR>=-5 && ((NewsTime>=Time[0] && NewsTime-Time[0]>1800) || (NewsTime=600)))// && TimeDayOfWeek(Time[0])<5)))

{

res=OrderSend(Symbol(),OP_SELL,1,Bid,3,Chandelier_Dn+Point+Point*4,Ask-(1000*Point),"SimbaSystemM1",MAGICSS,0,Red);

Simba and Malcik,

New tests.

I used the code of 0 the 200 pips.

One more time the results had been seemed to the one of the Simba.

I find that this is the way.

What you think?

Thanks...

Angelo

 

Ea

Simba and Malcik,

I modified the code to allow to optimize the values of tp, chand_min and chand_max, without touch in the code (extern variables).

Malcik and Simba, if had not liked the alteration or don't desire that the code is modified, please, informs to me.

I called the EA SimbaSystem v1.0 (not to be confused with the alterations).

Regards...

Angelo

Files:
 

Pilofe

pilofe:
Simba and Malcik,

I modified the code to allow to optimize the values of tp, chand_min and chand_max, without touch in the code (extern variables).

Malcik and Simba, if had not liked the alteration or don't desire that the code is modified, please, informs to me.

I called the EA SimbaSystem v1.0 (not to be confused with the alterations).

Regards...

Angelo

Hi Angelo,

First,thanks a lot for your cooperation..second,thanks a lot for your modification..no problem from my side,let`s hear from Malcik...

If you are in the mood of testing,I was testing the %WPR values,from5 to 350..with chandelier distance 1/200 and tp 1000..to ascertain the "zone"..and it seems to me that there are 2 zones..one is in the 55 area the other in the 90 area..it seems the 55 area is more profitable(like 20% more,when readapted to chdist35/100 ,tp355) but much more than 20%more riskier..so,for me,less interesting,at least for now,though it is worth noting where the zones are for future testing..

If you could test the results,for chanddistance 1/200 and TP1000,the results for WPR from 65 to 200..(I have done WPR 5 to 60(steps of 5) and 205 to 350..best results,for wpr 55 :34.437 profit,1.26 pf,53.8%maxdd,30.7% %pft..i have also tested around 90 for 80,85,90,95,100..but would like to know your opinion..so,if you can test 65 to 125 in steps of 5,and for 125 to 200 in steps of 15..we will be able to reach some conclusion)..

If you are not in the mood of testing,I understand it ,I will try to test during the next week..I have to go on a trip on Monday,and trade during the rest of the week,so,probably it won`t be until the next week end..In any case ,thanks a lot for your cooperation..and I sincerely hope that what we are posting here is useful for your trading..as it is going to be for mine

Thanks again and Regards

Simba

 

Pilofe

pilofe:
Simba and Malcik,

New tests.

I used the code of 0 the 200 pips.

One more time the results had been seemed to the one of the Simba.

I find that this is the way.

What you think?

Thanks...

Angelo

Hi Angelo,

Excellent,thanks a lot for your cooperation..I think that we now can start testing full time...but before,if you can confirm my latest tests..we will be even more sure..

These are the optimal settings I found...

FOR :SATL 4H

AND CHANDELIER 1H:CHAND DISTANCE MIN:35,MAX:100 AND TAKE PROFIT:355 PIPS...

Results:Profit factor 1.68;total profit:30.248 $; max%DD:15.6%;%Profitable trades 35.2%.....These are very good results,total profit is 3 times initial account in 2.7 years and max%Drawdown is contained below 20%..so,it seems a safe and profitable system..even if %profitable trades is low 35%,this is not bad,we can easily increase it to 66% by using aTP of 30 pips(decreasing max dd to 12.6% at the same time and with a slight decrease of PF to 1.61)..but total profit-which is the name of the game-will decrease to 15924 $..in addition,by visual observation of results tables I have a suggestion for Malcik.

SUGGESTION:Malcik,can you change/modify the EA,just so,that it only allows one position,so,no additional positions allowed..,or tell me which parameters I have to tweak in actual EA? I have observed that most of the second positions are losers,and their impact seems overally negative,but I want to test this assumption..If tested,it will improve both total profit and % profitable trades...

Angelo,try to replicate/disprove the above "optimal" settings and if replicated then we can start testing JMA/CHAND DISTANCE/TP combinations..and splitting the job,if it seems ok to you

To find the above mentioned results i tested,all possible chand distance combinations-for tp 1000- from 1/200,10/200....1/50...etc,then i tested tp strategies-for chand1/200 -from 10 to 100,in steps of 10,then from100 to 1000 in steps of 100...then i combined the best "zones" (chand 35/40 to 90/120..and tp from 200 to 400) to find ,first an optimum,and second ,if the improvement was "across the board",which is a sign of consistency, ie:if applying chand 35/110 to all tp strategies(with previous chand 1/200) improved all of them across the board(yes,it did ),or,if applying TP300,350,400 TO CHAND 35/90..40/120(with previous tp 1000) improved them across the board...(yes it did ,again )..Between 40 and 50 tests,but Ithink it was worth the time..

So,Angelo,if you want and can repeat my test to compare the results,so that we can be sure..I will be extremely thankful

Regards

Simba

 

Hi all, sorry for being out for another two days... but that's it, from now on I'm back to regular schedule

Pilofe, thanks for joining our testing, as you can see your work has been and will always be very helpful to all of us.

Thanks also for modifying the EA... I'll check it, append the features proposed by Simba and settle the parameters stuff, and release official version 1.1 that will be good for further testing. I guess I'll comment out the switches between the different trend indicators and leave SATL hard-coded since it looks like we now know it is the best option for us. If necessary in the future, I'll put this feature back... but for now I want to have it removed so that the source code is as simple and fast as possible. I don't want to jam your CPUs

Simba, thanks for further conclusions. Like I said, I'll do the EA thing and make it more useful for computerized testing. I'll also redo your backtests and try to think about them too, just give me folks a couple of hours of tonight

Thanks for your cooperation!

 

Malcik

Malcik:
Hi all, sorry for being out for another two days... but that's it, from now on I'm back to regular schedule

Pilofe, thanks for joining our testing, as you can see your work has been and will always be very helpful to all of us.

Thanks also for modifying the EA... I'll check it, append the features proposed by Simba and settle the parameters stuff, and release official version 1.1 that will be good for further testing. I guess I'll comment out the switches between the different trend indicators and leave SATL hard-coded since it looks like we now know it is the best option for us. If necessary in the future, I'll put this feature back... but for now I want to have it removed so that the source code is as simple and fast as possible. I don't want to jam your CPUs

Simba, thanks for further conclusions. Like I said, I'll do the EA thing and make it more useful for computerized testing. I'll also redo your backtests and try to think about them too, just give me folks a couple of hours of tonight

Thanks for your cooperation!

Hi Malcik,

Thanks for doing the proposed changes..if possible ,leave the option for alternative trend filtering method,since I still haven`t finished with JMA..and we need its phase advancing capabilities for further testing..and I would like to test HMA too.

So,if possible,just leave the EA as it is,but with the possibility of blocking additional positions..

Regards

Simba

Reason: