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
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

Avatar
Ulises Cune
  • New version that fixes an error when renaming the file when using "Volatility Filter"
  • When using Parabolic SAR it is renamed to:
    "PSarDirection_" if Signal Type Directional is used
    "PSarSignal_" if Signal Type Signal is used

CommunityPowerEA_MyDefault_run.bat
CommunityPowerEA_MyDefault.ps1

Avatar
Ulises Cune

Hello there,

I want to share some improvements that I have made in this script that can be useful to someone.

The script disables unused options such as "Volatility for all parameters nominated in points" if "points" is used in all values.

If oscillators are disabled, disable "Open/OpenMartin/Close/Partial/HedgeOn"

The script places as "Expert_Id" the version of CommunityPower, for example, if you are using CP v2.38 put 238. This must be edited manually in the script to change it.

The script places the date and time in "Expert_Comment" to uniquely identify a strategy.

Another function that I find interesting is to rename the file according to the indicators used.

For example, if the file is called "EURUSD_100Cent.set" and you use a Stocastick K Oscillator, an IdentifyTrend, and a Fibonacci, rename the file to "EURUSD_100Cent_StochasticD1_IdentifyTrend_FIBO1.set"

All this does not modify the final result of the strategy, it continues to produce the same result.


CommunityPowerEA_MyDefault.ps1


Avatar
Andrey Khatimlianskyi

Ulises,

I always try to make all necessary optimizations in my code.

But thank you for your contribution!