I am looking for clarification on several points on how to handle different situations. Also seeking to make sure that I have the correct understand how things work under the hood.
Currently I am using version 7 of ninja trader and running my strategy on the Sim101 account. At some point I would like to move over to live trading with FXCM.
I have been going over the docs for the past couple of days, to the point where my strategy does places trades. When it comes to Stop Loss, Take Profits and Entering on a limit or stop I am still confused.
Currently I am using the Unmanaged methodology because I think it is the proper methodology to be able a finer control of my orders and to facilitate when looking at historical trades being able to know which trades came from which strategies that I am running.
What I am used to when placing an order is something along the lines of Entry Price, Stop Loss Price and Take Profit Price of depending on the broker submitting then entry order and then after that submitting the order to set the stop loss and take profit.
When using the SubmitOrder() function and for OrderType it has 4 different types; OrderType.Market doesn’t require any explanation. But the other 3 Limit, Stop and StopLimit have me confused. Is the Limit just a BuyLimit? And that’s why there is a StopLimit and is the Stop OrderType for both a BuyStop and a Sell Stop??
Also in a SubmitOrder() there is a Limit Price and Stop Price I would say that these are the Buy/Stop Limit Price and the Buy/Sell Stop Prices, but in the function docs for ChangeOrder() it leads me to think that the Limit Price = Take Profit and the Stop Price is the Stop Loss.
Can someone please explain these options?
I am thinking that I should be using OnExecution() to do Stop Loss and Profit Taking Change Submissions and OnOrderpdated() to do Error and order Rejection is this the best mindset to have?
I am assuming that once and order has been submitted it creates a new IOrder object to be returned and that is why we can add them to a list collection to track them.
Concerning the OrderState of an IOrder Object, I think I understand all of them but the working state, what is that?
What is the order of states after an order is submitted; here is what I think it is please correct me if I have it wrong
1 Order Submitted
2 Pending Submit, Change or Cancel
3 Accepted or Rejected
4 Canceled, Filled or Partial Fill
If I have multiple strategies running on the same instrument and timeframe how does the Position Object and Trade Objects know which positions and trades belong to which strategies?
In the docs for OnPositionUpdate() it states whenever a position state changes this event is fired, are these the same states as the IOrder Object?
Thank you for your Time
EK


Comment