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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      68 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      151 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X