Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CS0029 with EnterShortStop

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

    CS0029 with EnterShortStop

    IOrder entryOrder = EnterShortStop(1,entry);

    results in CS0029 - Cannot implicitly convert type void to NinjaTRader.Cbi.IOrder

    Other overloaded EnterShortStop methods work fine and return a IOrder Object (as documented).

    Version is 6.5.1000 (Live)

    #2
    Hi michaelbb,

    You will want to first do this in Variables:
    Code:
    private IOrder entryorder = null;
    Then in OnBarUpdate() where you want to place the order:
    Code:
    entryOrder = EnterShortStop(1, entry);
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh,

      my code was to demonstrate the compiler error.

      Is your code compiled on your NinjaTrader version?

      On my version the EnterShortStop method is defined as:

      void EnterShortStop(int quantity, double stopPrice)

      It should be:

      IOrder EnterShortStop(int quantity, double stopPrice)

      Comment


        #4
        Hi michaelbb,

        I see what you mean now. Thanks for bringing this to our attention. I will get in contact with development.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        60 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        148 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
        98 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        286 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X