Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Action.Buy not compiling on 7

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

    Action.Buy not compiling on 7

    I was trying to recompile all my old codes to Ninja 7 and I am getting this error when defining variables ; (System.Action doesnt contains a definition for Buy)

    Action targetAction = Action.Buy;

    What can I do ?
    pmaglio
    NinjaTrader Ecosystem Vendor - The Indicator Store

    #2
    Please see here: http://www.ninjatrader.com/support/f...ad.php?t=21016

    It has been renamed to OrderAction.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I Changed
      "Action targetAction = Action.Buy;"
      by
      "Action targetAction = OrderAction.Buy ;"

      ..and I get this error ;

      CS0029 "Cannot implicitly convert type 'NinjaTrader.Cbi.OrderAction' in 'System.Action'

      What am I doing wrong ?
      pmaglio
      NinjaTrader Ecosystem Vendor - The Indicator Store

      Comment


        #4
        If you're working with it in the IOrder or AtmStrategyCreate() context the change should fit, could you perhaps post the 6.5 code you're trying to adapt?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          This is the original 6.5 code I was trying to convert...
          btw, I dont fully remember what it does, it is a strategy with some functions called from my main strategies and indicators ;

          Attached Files
          pmaglio
          NinjaTrader Ecosystem Vendor - The Indicator Store

          Comment


            #6
            pmaglio,

            You need to be changing both parts to OrderAction. You can't leave it as Action on the left hand side of your statement and OrderAction on the right hand side.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Thanks Josh !

              Everything compiled and working perfect !
              pmaglio
              NinjaTrader Ecosystem Vendor - The Indicator Store

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by doihaveto13, Today, 12:46 PM
              1 response
              3 views
              0 likes
              Last Post NinjaTrader_Zachary  
              Started by owen5819, 05-11-2024, 02:24 PM
              3 responses
              20 views
              0 likes
              Last Post owen5819  
              Started by Vitamite, Today, 12:48 PM
              0 responses
              5 views
              0 likes
              Last Post Vitamite  
              Started by MrAdamSK, 04-02-2024, 11:25 PM
              3 responses
              41 views
              0 likes
              Last Post NinjaTrader_Zachary  
              Started by lakman184, 03-24-2024, 01:30 PM
              7 responses
              36 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X