NAS 2m HULL-SAR trading system
Forums › ProRealTime English forum › ProOrder support › NAS 2m HULL-SAR trading system
- This topic has 343 replies, 42 voices, and was last updated 1 year ago by bege.
-
-
03/22/2021 at 2:12 PM #16491203/22/2021 at 3:01 PM #164913
Phew! that took some finding!
winnie37 … did you make the changes I detailed in the above post?
03/22/2021 at 3:14 PM #16491503/22/2021 at 3:32 PM #164920Thanks @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 ?
03/22/2021 at 3:46 PM #164927But 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!
1 user thanked author for this post.
03/22/2021 at 3:53 PM #164930I 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?)
03/22/2021 at 6:13 PM #16495703/22/2021 at 7:01 PM #16495903/22/2021 at 8:11 PM #164964Optimiser 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.
1 user thanked author for this post.
03/22/2021 at 8:55 PM #164969Let 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 …
165 smoothD = STD[20](close)2 users thanked author for this post.
03/23/2021 at 1:31 PM #165027Curiously, 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?
1positionsize = startpositionsize + Strategyprofit/(factor*margin)03/23/2021 at 1:58 PM #16503603/23/2021 at 2:16 PM #165040The 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:
123456789101112131415161718192021222324252627282930//Money Management DJMM = 0 // = 0 for optimizationif MM = 0 thenpositionsize= 0.4ENDIFif MM = 1 thenONCE startpositionsize = 0.2ONCE factor = f // factor of 10 means margin will increase/decrease @ 10% of strategy profit; factor 20 = 5% etcONCE margin = (close*.05) // tier 1 margin value of 1 contract in instrument currency; change decimal according to available leverageONCE margin2 = (close*.05)// tier 2 margin value of 1 contract in instrument currency; change decimal according to available leverageONCE tier1 = 55 // IG first tier margin limitONCE maxpositionsize = 550 // IG tier 2 margin limitONCE minpositionsize = 0.2 // enter minimum position allowedIF StrategyProfit <> StrategyProfit[1] THENpositionsize = startpositionsize + Strategyprofit/(factor*margin)ENDIFIF StrategyProfit <> StrategyProfit[1] THENIF startpositionsize + Strategyprofit/(factor*margin) > tier1 thenpositionsize = (((startpositionsize + (Strategyprofit/(factor*margin))-tier1)*(factor*margin))/(factor*margin2)) + tier1 //incorporating tier 2 marginENDIFIF StrategyProfit <> StrategyProfit[1] THENif startpositionsize + Strategyprofit/(factor*margin) < minpositionsize THENpositionsize = minpositionsize //keeps positionsize from going below allowed minimumENDIFIF (((startpositionsize + (Strategyprofit/(factor*margin))-tier1)*(factor*margin))/(factor*margin2)) + tier1 > maxpositionsize thenpositionsize = maxpositionsize// keeps positionsize from going above IG tier 2 margin limitENDIFENDIFENDIFENDIFOnce 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 ???
1 user thanked author for this post.
03/23/2021 at 2:19 PM #165041Suggestions: end of code
that means it’s missing an ENDIF. But if you copy and paste the above code it should be fine.
03/23/2021 at 2:27 PM #165043 -
AuthorPosts
Find exclusive trading pro-tools on