I, like anyone else, initialize the whole bunch of variables in Initialize() method. Recently I added Print line there with the version number just to keep track.
Print("Strategy Version 5");
I only expected to see this line in output window when I enable the strategy, which it does of course. However, if I right mouse click on the chart and go to strategies section to check which parameters I have set, I see the output of the Print command in output window. The mere fact just going to strategy section on the chart triggers it. At first I was scared because initializing variables on the middle of the trade would ruin my logic, but all seems to be working fine.
My question is what Initialize() method is triggered than to print that line? Is it a different memory space from the one where strategy is running?
Thanks,
redduke
Comment