Hi JCL,

I had read about globals not being set until the script was compiled unless they were set with if(InitRun) but it was a little confusing.

These variables are not changed, ever. Shouldn't they be read at runtime? I have a reasonable amount of experience in MQL4 and R so analogies to those environments may help me understand what is happening here.

Is it something like this: the script is run on (eg) EURUSD and the script is compiled, TP/buffer is calculated and the script proceeds. When it is run on another symbol, the script is already compiled so it does not recalculate these values(?).
So zorro scripts do not 'initialise' with every new run unlike MQL4 or R which will recalculate values upon runtime unless they are called from global variables or the local environment respectively(?)

I had checked the log and thought they may not be closing but I also thought that open trades would also be plotted. Small teething problems when moving to a new platform, I'll get there.

While I have you, could you please tell me what this is:
Code:
(EUR/AUD::S) Missed entry 1.4438 after 1 bar


Are the trades automatically expiring after one bar? There is no expiry set on them (that I know of). How can I make pendings remain until they are deleted? Also, how do I access the trade pool as I'd like to move pendings or set more pending trades relative to existing ones. I believe its through the TRADE* structure however structures/classes are something I've never understood. Do you have some simple boilerplate code that demonstrates the above?

Cheers,
BobbyT

PS: I'm a bit off topic now so if you'd like me to start a new thread feel free to say so laugh
Another PS/Edit: I have noticed that trades are closing when they shouldn't be. I have set no SL and no expiry on any trades yet in addition to pendings (possibly) being deleted, open trades are closing for no apparent reason. Any ideas?

Last edited by BobbyT; 07/04/17 16:45.