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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      68 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      55 views
      0 likes
      Last Post CarlTrading  
      Working...
      X