Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Multicharts SetCustomFitnessValue for Equity Curve
I am in the process of trying to figure out how to use the SetCustomFitnessValue in MC to optimize a specific system for a more linear equity curve. I have done some searching on the Multicharts forum, and here, and can't seem to find anyone trying or producing any examples. I did find an old EasyLanguage post, if you search on google for "set custom fitness value equity curve"
The resulting signal that I produced using code from that Forum (Kreslik), was:
The result was that MultiCharts crashed, I am using the most recent version of MC 8 64bit. I am not the best with EasyLanguage, but I am interested in finding out how to fix this. This is pretty experimental on my part, I don't know if it even makes sens to try and optimize for an equity curve alone.
If anyone is interested in helping, it might be great for the community to get this going.
By the way, I didn't post the link tot he forum where the code originated but would be willing to if it was allowed/required.
Can you help answer these questions from other members on NexusFi?
It is the first time I use custom fitness. But, this is something I wanted to test. So I take the opportunity of your message.
As you can see in the code, an array is created (aCumEquity). Its size is the number of bars on the screen. So, it may be huge. But should be OK.
However, at each bar, the code traverses twice all the existing bars on the screen: "for tCounter = 1 to vTotalBars". This is what seems strange to me. It generates an enormous amount of calculation.
On my computer, the implementation of a simple strategy (unprofitable MA crossover) takes a lot of time. And my computer has more or less frozen when I tried an optimization.
Do you think that the code within "if (numwintrades + numlostrades) > 0 [...] end" shall be executed at each bar, or only at the last?
If your answer is "only at the last", you could try to replace by "if LastBarOnChart AND (numwintrades + numlostrades) > 0 [...] end" and see what happens.
On my computer, it allowed a quick optimization (UPDATE: see screenshot below). But you have to check that the code is still fulfilling its purpose.
I was looking on how to do this myself. I found a feature request put in by @BigMike on the multicharts Project Manager it says released. But i cant find it in the custom or pull down menu for optimization? Anyone figure out how to use it yet?