Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Id Error

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

    Id Error

    ************************************************** ****
    Instrument:GC 08-13
    atmStrategyIdL:
    orderIdL:
    atmStrategyIdS: 8ad1851fc1e34bcfa8d6afba868147da
    orderIdS: 62e98496ec7646b898fa62115b115064
    Time: 7/9/2013 2:30:00 PM
    ************************************************** ****
    **NT** GetAtmStrategyMarketPosition() method error: AtmStrategyId '8ad1851fc1e34bcfa8d6afba868147da' does not exist
    **NT** GetAtmStrategyMarketPosition() method error: AtmStrategyId '8ad1851fc1e34bcfa8d6afba868147da' does not exist
    -----------------+++++++++++++++++++++++++++++++++++-------------------------------

    I still got that error even do it clearly that the Id exist. Some ideas?

    #2
    Hello edward_bell,

    Thank you for your post.

    Can you provide a sample of your script that reproduces this error?

    I look forward to your response.

    Comment


      #3
      In my code I've put this lines:

      Print("******************************************* ***********");
      Print("Instrument:" +Instrument.FullName);
      Print("atmStrategyIdL: " +atmStrategyIdL);
      Print("orderIdL: " +orderIdL);
      Print("atmStrategyIdS: " +atmStrategyIdS);
      Print("orderIdS: " +orderIdS);
      Print("Time: " +Time[0]);
      Print("******************************************* ***********");


      if(orderIdS.Length > 0
      && atmStrategyIdS.Length > 0
      && GetAtmStrategyMarketPosition(atmStrategyIdS) == Cbi.MarketPosition.Flat)
      {

      Print("-----------------+++++++++++++++++++++++++++++++++++-------------------------------");
      Print("1. short: cancel unfilled order.");
      Print("Time: " +Times[0][0]);
      Print("-----------------+++++++++++++++++++++++++++++++++++-------------------------------");
      AtmStrategyCancelEntryOrder(orderIdS);



      orderIdS = String.Empty;
      atmStrategyIdS = String.Empty;
      }


      Even this lines I've got an error:

      if (atmStrategyIdS.Length > 0)
      {
      Print("----------------------++++++++++++++++--------------------------");
      // Print some information about the strategy to the output window
      Print("The current ATM Strategy market position is: " + GetAtmStrategyMarketPosition(atmStrategyIdS));
      Print("The current ATM Strategy position quantity is: " + GetAtmStrategyPositionQuantity(atmStrategyIdS));
      Print("The current ATM Strategy average price is: " + GetAtmStrategyPositionAveragePrice(atmStrategyIdS) );
      Print("The current ATM Strategy Unrealized PnL is: " + GetAtmStrategyUnrealizedProfitLoss(atmStrategyIdS) );
      Print("Time: " +Time[0]);
      Print("----------------------++++++++++++++++--------------------------");
      }

      I've check every Id before inquiring a market position and anything else.

      Comment


        #4
        Hello edward_bell,

        Thank you for your response.

        Can you forward me your NinjaScript file for this strategy to support[at]ninjatrader[dot]com?

        You will find the strategy located in the following directory on your PC: (My) Documents\NinjaTrader 7\bin\Custom\Strategy

        Please place 'ATTN: Patrick - 878462' in the subject line and a reference to this thread in the body of the e-mail: http://www.ninjatrader.com/support/f...ad.php?t=59197

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by adeelshahzad, Today, 03:54 AM
        5 responses
        32 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by stafe, 04-15-2024, 08:34 PM
        7 responses
        32 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by merzo, 06-25-2023, 02:19 AM
        10 responses
        823 views
        1 like
        Last Post NinjaTrader_ChristopherJ  
        Started by frankthearm, Today, 09:08 AM
        5 responses
        19 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        43 views
        0 likes
        Last Post jeronymite  
        Working...
        X