I need to catch status of marketposition outside onbarupdate. When I had a short script and a long script this was working fine in OnExecution because when flat then I could reset everything.
Now I need to have short and long trades in one script and this doesn work. How can I reset variables in OnExecution (or OnOrderupdate) when long position is flattened or short position is flattened. Couldn´t get it.
Thank you!
Tony
Comment