Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Some basics please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Some basics please

    Hi,

    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
    Last edited by TrevorE; 05-10-2010, 11:27 PM.

    #2
    TrevorE, correct for any order excluding market orders you want to either resubmit the order on each bar update or set them to liveUntilCancelled at submission.

    http://www.ninjatrader-support.com/H...verview36.html

    A very helpful tool for debugging is the TraceOrders feature -

    http://www.ninjatrader.com/support/f...ead.php?t=3627

    Normally a profit target exit is a limit order (this price or better) and the stop loss is a StopMarket / StopLimit order to protect you then.

    What you need to manage in your code is the timing when to issue the order to be placed at price x, for example if a new low for the day is made, if it's 1 minute past 10 AM, if a technical indicator crossed below a certain level etc.

    For basic order type definitions in the futures markets, perhaps this link will help clarify before proceeding - http://commodities.about.com/od/type...rket-order.htm

    The trace line you posted means the profit target you placed was cancelled as the position it was tied to was closed by another order already.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks

      Thanks for your prompt reply as always Bertrand.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Frank1000, Today, 03:05 AM
      0 responses
      3 views
      0 likes
      Last Post Frank1000  
      Started by ntdev, Today, 01:14 AM
      4 responses
      15 views
      0 likes
      Last Post ntdev
      by ntdev
       
      Started by ct, Today, 02:22 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by yodaler, Yesterday, 06:12 PM
      4 responses
      12 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by sinpeople, 05-07-2021, 04:38 AM
      2 responses
      21 views
      0 likes
      Last Post hedgeplay  
      Working...
      X