Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Creating stop order

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

    Creating stop order

    Hello
    I am trying to create an order from the indicator

    Code:
    Order ord=a.CreateOrder(Instrument,OrderAction.Buy,OrderType.Market,OrderEntry.Manual,TimeInForce.Day,1,0,0,"","",DateTime.MaxValue,null);
    The market order is placed normally. The position is opened.

    Code:
    Order ord=a.CreateOrder(Instrument,OrderAction.Buy,OrderType.StopMarket,OrderEntry.Manual,TimeInForce.Day,1,0,stop_price,"","",DateTime.MaxValue,null);
    Error
    Click image for larger version  Name:	fail1.png Views:	0 Size:	75.7 KB ID:	1090707

    I don't use OCO.
    Is this normal behavior? Or to work with limit and stop orders from the indicator I need to make a license upgrade?
    Last edited by newbe17; 03-17-2020, 07:53 AM.

    #2
    Hello newbe17,

    Thanks for your post.

    I have tested the AddOn framework using the Free Edition License, and I am not getting this error. I've tested using syntax similar to what you have provided as well.

    Please ensure that you are on the latest version of the platform and please test using the test script I have attached.The current version of NionjaTrader 8 is Release 21.

    Update platform - https://ninjatrader.com/PlatformDirect

    I look forward to assisting.
    Attached Files

    Comment


      #3
      This is cool!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      605 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      351 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      560 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      561 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X