Script to optimize the Setting File, not the Strategy

Avatar
  • updated

Hello Community,

The idea of ​​this script is to disable options that are not necessary for the strategy, visual options and indicators that are not used for better performance when left running on the VPS.

Step to detail:

- Put an Expert_Id number with the latest version of CommunityPower, for example, v2.34, put 234.

- Put in Expert_Comment the date and time of when this script was executed with this Setting file.

- In all the properties a text is placed in replacement of the === to identify improve the sections.

- The Virtual Stop Loss option is set to False, the same with Virtual Take Profit.

- With the time setting, the GMT and DST are set according to what is in the script. This should be edited each for the broker you use. THIS MUST CHANGE IT FOR ONE ACCORDING TO THE BROKER YOU USE

- If volatility is not used in "calc mode", the use of volatility is disabled since it is not used in any option.

- For EUR / USD, the time to start trading is set at 00:05 until 23:00 to avoid open trades and thus avoid SWAP. On Friday it operates only until 22:00.

- If volatility distance is not used in ZigZag and MA # 1, # 2 and # 3 then it is disabled in VolMA_Type = false

- If Open/OpenMartin/Close/Partial is not used, the indicator is disabled (BigCandle_Type = "0", Oscillators_Type = "0", etc)

The script is a text file and everyone can modify it and adapt it to their needs.

The changes should not affect the strategy, except if you use the filter of news and time.

Each one has its own way of operating and its own configuration that it uses in each strategy, you can adapt it to your needs.

I hope it is useful to you as much as it is being for me.

Image 1499

Image 1500


Image 1501


Any collaboration or suggestion is welcome.

Thanks Andrey for this great EA

CommunityPowerEA_Optimization.ps1

Avatar
wilson

DO YOU HAVE A VIDEO ON USAGE OF THIS SCRIPT

Avatar
Andrey Khatimlianskyi
Quote from Ulises Cune

In the link attach the two .set files, the original and the optimized one, not the .ini.

The two tests were similar

Please, read again my messages.

I made 2 tests with your sets. Optimized was slower than original.

I attached my tester ini so you can make the same tests on your PC.

Avatar
Ulises Cune

In the link attach the two .set files, the original and the optimized one, not the .ini.

The two tests were similar

Avatar
Andrey Khatimlianskyi
Quote from Ulises Cune

These are the differences:

Original
Optimized
ManageManual=false ManageManual=true
VolPV_Type=1 VolPV_Type=0
UseVirtualSL=true UseVirtualSL=false
UseVirtualTP=true UseVirtualTP=false
No Exist MaxStepSize=0
BE_Alert_After=3 BE_Alert_After=0
Oscillator2_OpenOn=2 Oscillator2_OpenOn=0 Oscillator2 is disabled so the OpenOn and CloseOn options are unnecessary
Oscillator2_CloseOn=2 Oscillator2_CloseOn=0 Oscillator2 is disabled so the OpenOn and CloseOn options are unnecessary
VolMA_Type=2 VolMA_Type=0 Volatility Indicator = StdDev, but it is unnecessary since no MA filter or the ZigZag is used
Time_Manual_GMT_Offset=3 Time_Manual_GMT_Offset=2
NextOrder_Width=1 NextOrder_Width=0
StopLoss_Width=1 StopLoss_Width=2
TakeProfit_Width=1 TakeProfit_Width=2
TakeProfit_Style=4 TakeProfit_Style=3
GUI_Enabled=true GUI_Enabled=false
Show_Pending=true Show_Pending=false
MaxHistoryDeals=1 MaxHistoryDeals=500
Open_PriceLabel_Width=0 Open_PriceLabel_Width=1
Close_PriceLabel_Width=0 Close_PriceLabel_Width=1
MessagesToGrammy=true MessagesToGrammy=false

It strikes me that the option "MaxStepSize" does not exist in the original Said file since it exists in the public version of CP 2.38.

I checked again and the results were similar between the two. Use Period=M1 from 2019 to 2021. MT5 Build 3091. Restart my computer for this last test, maybe something was wrong in MT5.

Thanks Andrey

MaxStepSize was added later than Sai created the set.

Of course, I checked the differences between your set-files. I guess, only Virtual SL and TP can affect the speed, other changes can be voided.

So, your new test showed the difference in the speed as before or no?

I attached tester ini file so you can run the same test as mine.

Please, check it again.

Anyway, as I said before, I optimized everything I can.

So, if you have such a difference in testing speed, it is better to send me 2 set files so I can check and fix the difference in my code.

Avatar
Ulises Cune

These are the differences:

Original
Optimized
ManageManual=false ManageManual=true
VolPV_Type=1 VolPV_Type=0
UseVirtualSL=true UseVirtualSL=false
UseVirtualTP=true UseVirtualTP=false
No Exist MaxStepSize=0
BE_Alert_After=3 BE_Alert_After=0
Oscillator2_OpenOn=2 Oscillator2_OpenOn=0 Oscillator2 is disabled so the OpenOn and CloseOn options are unnecessary
Oscillator2_CloseOn=2 Oscillator2_CloseOn=0 Oscillator2 is disabled so the OpenOn and CloseOn options are unnecessary
VolMA_Type=2 VolMA_Type=0 Volatility Indicator = StdDev, but it is unnecessary since no MA filter or the ZigZag is used
Time_Manual_GMT_Offset=3 Time_Manual_GMT_Offset=2
NextOrder_Width=1 NextOrder_Width=0
StopLoss_Width=1 StopLoss_Width=2
TakeProfit_Width=1 TakeProfit_Width=2
TakeProfit_Style=4 TakeProfit_Style=3
GUI_Enabled=true GUI_Enabled=false
Show_Pending=true Show_Pending=false
MaxHistoryDeals=1 MaxHistoryDeals=500
Open_PriceLabel_Width=0 Open_PriceLabel_Width=1
Close_PriceLabel_Width=0 Close_PriceLabel_Width=1
MessagesToGrammy=true MessagesToGrammy=false

It strikes me that the option "MaxStepSize" does not exist in the original Said file since it exists in the public version of CP 2.38.

I checked again and the results were similar between the two. Use Period=M1 from 2019 to 2021. MT5 Build 3091. Restart my computer for this last test, maybe something was wrong in MT5.

Thanks Andrey

Avatar
Andrey Khatimlianskyi
Quote from Ulises Cune

Sorry, I don't see the differences. "Total net Profit" are equal, the amount of Trades are equal. What is the difference?

The difference is in the testing time. The optimized version lasts longer.

Avatar
Ulises Cune
Quote from Andrey Khatimlianskyi

Thanks for your tries!

But I have quite different results:

Tester ini — SetOptimizator_Test.ini

I used my ICMarkets account for test.

Sorry, I don't see the differences. "Total net Profit" are equal, the amount of Trades are equal. What is the difference?

Avatar
Andrey Khatimlianskyi

Another trick:

Avatar
Andrey Khatimlianskyi
Quote from Ulises Cune

Hello, 

I want to show how disabling some unnecessary options improves backtesting performance. Significantly reduces backtesting time.

I will take as an example a strategy of Said (

https://communitypowerea.userecho.com/en/communities/4/topics/413-big-candle-set

).

Said original strategy takes 15:00 Minutes aprox, using my script that disables unnecessary options takes 3Min aprox to finish with the same results

Image 1931

Image 1932


Image 1933



Image 1934

Original File:

Big Candle.set

Optimized:

Big Candle_BigCandle_StochasticK1_IdentifyT....set

Thanks for your tries!

But I have quite different results:

Tester ini — SetOptimizator_Test.ini

I used my ICMarkets account for test.