Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter using Limit order with Strat Wizard

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

    Enter using Limit order with Strat Wizard

    I tried to use the Wizard to create a simple strategy that uses Limit orders instead of simple EnterLong/Short. So when 'something happens' I wanted to set an Entry Limit order with where limit price = a defined price level variable.

    Example:

    If 'something' happens
    then set variable0 and enter via limit:

    {
    Variable0 = Low[1];
    EnterLongLimit (DefaultQuantity, Variable0, "")
    }

    Where am I going wrong here? How do you use EnterLimit in the Wizard?

    Thanks.

    #2
    Hi billr,

    It looks OK from here. Where are you running this strategy (historical or real time) and what is wrong exactly?
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi Ryan,
      It simply did not place the order.
      I was testing it in MarketReplay.

      Comment


        #4
        Also, if it does intitiate an order, what determines how long the order is in effect? If I want to place a time or number of bars limit on how long the Limit order is in place, how do I do that?

        thanks.

        Comment


          #5
          You will need to debug this, by using Print() to check values used in your entry conditions, and checking TraceOrders output for messages related to strategy orders. Also check that the strategy is green and ready to submit orders. Help for using these tools is available here:


          The order will be live for one bar unless the conditions remain true for the order, and then will remain active. You can submit orders using the advanced overload with liveUntilCancelled = true, if you wanted to custom code your own cancellation logic. This sample can help with using CancelOrder:
          When using NinjaTrader's Enter() and Exit() methods, the default behavior is to automatically expire them at the end of a bar unless they are resubmitted to keep them alive. Sometimes you may want more flexibility in this behavior and wish to submit orders as live-until-cancelled. When orders are submitted as live-until
          Ryan M.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by elderan, Today, 08:03 PM
          0 responses
          2 views
          0 likes
          Last Post elderan
          by elderan
           
          Started by algospoke, Today, 06:40 PM
          0 responses
          10 views
          0 likes
          Last Post algospoke  
          Started by maybeimnotrader, Today, 05:46 PM
          0 responses
          9 views
          0 likes
          Last Post maybeimnotrader  
          Started by quantismo, Today, 05:13 PM
          0 responses
          7 views
          0 likes
          Last Post quantismo  
          Started by AttiM, 02-14-2024, 05:20 PM
          8 responses
          169 views
          0 likes
          Last Post jeronymite  
          Working...
          X