I come from a programming backround and have very little trading experience and am finding it really difficult to understand the basics of order management.
I have played around with strategies using EnterShort() and EnterLong() which in my limited understanding seemed to work.
All I am now trying to do is to place an order that when the price gets to a certain level, above or below the current level, the order must trigger but if it does not it must cancel itself (and all associated orders that may have been generated when I placed this order) after x ticks.
I have tried EnterShortLimit() with the price I want the order to trigger at as the "limitPrice" parameter but that is not working.
Basically what I want to do is the same as when you are in the DOM and place an order that has all it's parameters and just sits there waiting to trigger or can be cancelled by you before it triggers. Except in this case it would cancel itself after x amount of ticks.
There are a few basics that cannot come to grips with...
1) The help files seem to indicate that I have to call the order submission function (EnterShort or EnterShortLimit etc.) every time
OnBarUpdate fires otherwise the order will be cancelled. Just to see what happens, I have programmed this using flags, to only call the order submission function once and found that the order still runs it's full cycle, either to target or stop?
What is really happening when I submit an order every time OnBarUpdate fires?
Is a new order being created every time or is the existing one just being kept alive perhaps with any new values that have been passed?
2) What does Limit and Stop really mean. As far as I understand Limit should mean the profit value at which you want your order to come out at having made a profit. Stop should mean the value you want the order to come out at having made a loss?
3) Do I have to manage the logic myself from within the program as to when to place the order instead of 'placing' and order which I want to trigger at a certain price?
4)I got this line in the output window, what exactly does it mean and what is an 'exit order'?
Cancelled pending exit order, since associated position is closed: Order='NT-26097/Sim101' Name='Profit target' State=Working Instrument='ES 06-10' Action=BuyToCover Limit price=1252.75 Stop price=0 Quantity=1 Strategy='ITSimpleVWMA' Type=Limit
Sorry for the stupid questions but everyone is referring me to the help guides and I have spent a lot of time trying to understand the basics but is seems as though they expect you to at least to have a basic understanding of the jargon which I dont.
Any references to documentation for dummies like me outside Ninja that would help me to get a grip on this will also be appreciated.
Thanks for your time,
TrevorE
Comment