ExtSubscribe(1,nil,instance.period.parameters,instance.parameters.type...),
.......
Please read these sections:
Applying the strategy on candle data using the helper
ExtSubscribe function of helper.lua
...
(a) You can just write your functions into the separate file and then reuse it in a strategy by adding the call "dofile(filename)". Note that when installing the strategy in the platform, the helper file will not be installed. You should copy it into the "\FXTS2\Strategies\Custom" folder manually or write separate installer for your strategy.
.....
(d) You can use breakpoints in Strategy Debugger and Add Watch command to see values of variables during the execution of code...
.....
Hi Sunshine,
some follow on questions ( please excuse - probably I am not understanding all the details quite quickly)
(1) about the ExtSubscribe function - I tried to include the SAR indicator in the MA cross strategy and added the ExtSubscribe function from the SAR Averages strategy and got the following message: [string "C:\Gehtsoft\IndicoreSDK\Strategies\modMA_adv..."]:145 attempt to call global 'ExtSubscribe' (a nil value)
I could not figure out the reason, I checked using the watch function to see that all arguments (parameters) in the call were defined and had expected values. Although the same call works in the SAR Averages strategy and with the same parameter values.
(2) re using the dofile - Thanks, I can use that. What I did not understand is that in the example strategies the dofile call is once at the end of the file. When does this call get actually made and how does it get remade ie when data is to be updated?
I found also there is a loadfile call which is supposed to be more efficient - can you please explain if this is true and if so to verify that the returned value is used as a function call to execute the code section loaded by the load file?
(3) thanks about the breakpoint and watch functions in the debugger while I have figured out how to watch some variables - have not figured out how to look for example at what happend in a SetTag or a SetFlag call and also how the scope of the watch is defined - eg when I was watching a variable for a part of the code execution the data shown was as expected and while other functions were being executed the values were not defined.. Again if there is a manual on the debugger please point me to it .
Thanks very much for your help