when I use in the onexecutionsection a variable like
if (exitOrder1a != null && exitOrder1a == execution.Order&& execution.Order.OrderState == OrderState.Filled)
{
if(stopstep ==1) then do
if(stopstep==2) then do
(also when I do if (stopstep!= null && stopstep ==1) then do )
there appears in the output window the errormessage "error onexecution.. object reference not set to an instance"
When I do without the variables then there is no error-message in my script.
Can´t I use a variable in this section? Or how can I use it without causing error?
Thanks
Tony
Comment