I need some help about order management, I have read the help page, but there is a point i am not sure about.
I am currently running a multi instrument strategy, and under some conditions, I want to submit orders on each instrument. For now, I use this syntax:
EnterLong(Which Instrument ,How many, signal name);
and I do something like that for every instrument I have. When I try to use:
if (BarsInProgress == compteur){
EnterLong(How many, signal name);
}
the result is not the same. What is the difference between the two?
Moreover, let's say I have 2 Long position on an instrument, and now my algorithm tell me to be flat. Currently, I do:
ExitLong("", signal name);
and when my algorithm tell me to have 1 short position, I use:
Exitlong("", signal name);
EntryShort(Instrument, 1, signal name);
Is it correct? What about going from 2 Long to 1 Long? And to 3 Long?
I keep last actions required by my algorithm in an int array...
Thank you.
Comment