@grahal
i don’t manage to launch it with wf…
Phew! that took some finding!
winnie37 … did you make the changes I detailed in the above post?
I don’t understand how to launch it when it is ready with wf parameters. sorry, not the same backtest when i put the wf values in the code…😒
Thanks @GraHal,
I can launch this code in pro-order.
But the curious thing is when i write the correct code line 65 with smoothD parameters, i have average results. But i keep “std” without parameters, i find good results !!!!
Does any one have idea ? Why this good result ?
But i keep “std” without parameters, i find good results !!!!
It’s possible that when std is used in the code, then PRT is reading it as std[0](close).
Or maybe std[3]close as you had std set in the optimiser at 3.
Let us know you’re findings please?
EDIT
Weird though, as when I made the changes I mentioned re std / stl … I still got the good results, same as yours good results!
I don’t understand how to launch it when it is ready with wf parameters
Disable WF and enter your chosen values direct in the code or enter as fixed in the optimiser.
You cannot launch direct out of WF (to my knowledge?)
so replace the fixed values in the code….not the same results, strange….
CMMParticipant
Senior
I had the same problem and then got it working by replacing all to fixed values except “std” which I left as is and then it worked with the same result. I do not know why. Grahal pointed that out in a earlier reply.
Optimiser giving weird results now?
Attached is a good result .itf … with std back in (at line 65) but also accepted (no errors) by ProOrder.
CTime is optimised between Hour > 10 and Hour < 23 on attached … hence version – GHv1 – se we don’t get mixed up.
Let us know you’re findings please?
My findings are:
Using std in the code at Line 65 gives good / best results.
std (alone) is read by PRT the same as the default settings for std, as shown below …
65 smoothD = STD[20](close)
Curiously, i can’t run it in pro-order. It gives me a message who say me there is trouble line 18.
I think there is som truth to it! I have been experimenting with v5.3 on different markets and this has come up for me too, not being able to start it. Especially on short versions this has been a big issue! I would be very grateful if someone could take a look at this and find a solution because I like the algos performance. It´s a code line for MM but I have chosen MM=0?
positionsize = startpositionsize + Strategyprofit/(factor*margin)
“Code is invalid. Please correct it.
Line 18:
Characters missing. Suggestions: end of code”
The MM code is fine, but you have to change the settings according to what leverage you get. To the best of my knowledge, the IG margin rate for the DJ is 5% (everywhere except Switzerland). You can check this by clicking on Info>Margin Requirements on the deal ticket. This means the MM code should look like this:
//Money Management DJ
MM = 0 // = 0 for optimization
if MM = 0 then
positionsize= 0.4
ENDIF
if MM = 1 then
ONCE startpositionsize = 0.2
ONCE factor = f // factor of 10 means margin will increase/decrease @ 10% of strategy profit; factor 20 = 5% etc
ONCE margin = (close*.05) // tier 1 margin value of 1 contract in instrument currency; change decimal according to available leverage
ONCE margin2 = (close*.05)// tier 2 margin value of 1 contract in instrument currency; change decimal according to available leverage
ONCE tier1 = 55 // IG first tier margin limit
ONCE maxpositionsize = 550 // IG tier 2 margin limit
ONCE minpositionsize = 0.2 // enter minimum position allowed
IF StrategyProfit <> StrategyProfit[1] THEN
positionsize = startpositionsize + Strategyprofit/(factor*margin)
ENDIF
IF StrategyProfit <> StrategyProfit[1] THEN
IF startpositionsize + Strategyprofit/(factor*margin) > tier1 then
positionsize = (((startpositionsize + (Strategyprofit/(factor*margin))-tier1)*(factor*margin))/(factor*margin2)) + tier1 //incorporating tier 2 margin
ENDIF
IF StrategyProfit <> StrategyProfit[1] THEN
if startpositionsize + Strategyprofit/(factor*margin) < minpositionsize THEN
positionsize = minpositionsize //keeps positionsize from going below allowed minimum
ENDIF
IF (((startpositionsize + (Strategyprofit/(factor*margin))-tier1)*(factor*margin))/(factor*margin2)) + tier1 > maxpositionsize then
positionsize = maxpositionsize// keeps positionsize from going above IG tier 2 margin limit
ENDIF
ENDIF
ENDIF
ENDIF
Once you know the margin requirement, set that decimal and leave it – it’s not a variable. The only way to adjust how fast you want the positionsize to increase/decrease is the f value (factor). This is usually somewhere between 8 and 25. Because this algo cumulates orders, the total margin is going to be 3 or 4 times higher than usual so i would keep it to at least 20.
If MM=0 then, positionsize can be anything you want. If MM=1 then startpositionsize can also be anything you want. But MM can only = 0 or 1 (not 0.5, or anything else)
Apart from all that, I have no idea why it finds a problem with line 18 ???
Suggestions: end of code
that means it’s missing an ENDIF. But if you copy and paste the above code it should be fine.
Thanks nonetheless!
When MM=0, does it then matter at all the settings for MM?
(I have set cumulate orders = false)