Is there a way to set scale, data range and position options for compiled Strategies?
Author: Carova
Creation Date: 10/14/2018 10:13 PM
profile picture

Carova

#1
Is there a way to pre-program all of these in a compiled script so that they do not need to be entered manually each time a compiled script is run?

Vince
profile picture

Eugene

#2
Vince, you already asked: How can I set Scale, Data Range from inside a script?

Anyway, I don't expect Preferences > Advanced Options > "Save the following items with a Strategy..." to function in its entirety for compiled Strategies. As we know, Preferred Values cannot be saved for Strategy Libraries so I guess the rest can be affected by the same inability to save the settings back to the (inexistent) XML config of the compiled Strategy library.
profile picture

Carova

#3
Hi Eugene!

I was hoping that with access to more aspects of .NET that might be possible in a compiled environment. Obviously not. :(

Vince
profile picture

superticker

#4
QUOTE:
... I don't expect Preferences > Advanced Options > "Save the following items with a Strategy..." to function ... for compiled Strategies. ... [because of their] inability to save [these] settings back to [their nonexistent] XML config of [a] compiled Strategy library.
Why not simply create a "dummy strategy", which has an actual XML config (& source) file for saving your strategy preferences, and then have it call your compiled DLL strategy library where you need these preferences applied?
profile picture

Eugene

#5
Well, I haven't tested it. But I'd expect that the two (XML / compiled) strategies must have the same Guid to be identified by WL as the same Strategy object (i.e. identic name may not be enough). You can only reach it by copying the editable strategy's Guid into the Strategy code in your compiled library. However, sharing Guids and/or Strategy names between Strategies is unsupported and may cause some side effects that you do not want to experience in live trading etc.
profile picture

superticker

#6
QUOTE:
... the two (XML / compiled) strategies must have the same Guid to be identified by WL as the same Strategy object ...
I was thinking of leaving them (the XML primary and the DLL library strategies) as separate Guid objects. This way the XML primary strategy would define the parameters and the DLL library strategy would simply "default" to those parameters when it's called by the primary strategy. I'm gathering, by the above comment, this approach won't work. If so, then what will the DLL library strategy default to with its unique Guid? Does the Guid for the DLL library strategy point to some other parameters (say for Scale and Data Range) we don't know about? And how can we set/change those?

Could one simply create multiple DLL library strategies, each with different Guids, and set different strategy configs for each of them somehow? I'm thinking not because there's no XML place to store these parameter configurations in each independent DLL library.
profile picture

Eugene

#7
QUOTE:
Could one simply create multiple DLL library strategies, each with different Guids, and set different strategy configs for each of them somehow? I'm thinking not because there's no XML place to store these parameter configurations in each independent DLL library.

That's what I presumed in post #2 above.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).