Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Consolidated ATM Questions

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

    Consolidated ATM Questions

    1. I get this in the output window. What do I need to change?

    GetAtmStrategyEntryOrderStatus() method error: Missing orderId parameter

    Code:
    string[] entryOrder = GetAtmStrategyEntryOrderStatus(orderId);
    
    if (entryOrder.Length > 0)
        {
             Print("Average fill price is " + entryOrder[0].ToString());
             Print("Filled amount is " + entryOrder[1].ToString());
             Print("Current state is " + entryOrder[2].ToString());
        }
    2. In the Sample ATM Strategy, what is the significance of Cbi.MarketPosition.Flat as opposed to MarketPosition.Flat?

    Code:
    if (atmStrategyId.Length > 0 && GetAtmStrategyMarketPosition(atmStrategyId) == Cbi.MarketPosition.Flat)
    				atmStrategyId = string.Empty;
    3. Is this the correct syntax?

    string[,] Torders = GetAtmStrategyStopTargetOrderStatus("Target1", atmStrategyId);

    4. Is this correct Syntax?

    if(Torders[i, 2].ToString()=="Filled")

    {
    Print( "Target Worked");

    }


    Code:
    string[,] Torders = GetAtmStrategyStopTargetOrderStatus("Target1", atmStrategyId);
    
    if (Torders.Length > 0)
        {
            for (int i = 0; i < Torders.GetLength(0); i++)
             {
                  Print("Filled amount is " + Torders[i, 1].ToString());
                  Print("Current state is " + Torders[i, 2].ToString());
    			
    			if(Torders[i, 2].ToString()=="Filled")
    			{
    					Print( "Target Worked");
    			
    			}
    			
             }
        }

    #2
    I answered these in all your separate threads. Please see those threads for reference.




    If you have any further issues with atm strategies, please use this thread only.
    Last edited by NinjaTrader_RyanM1; 03-31-2011, 09:07 AM.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_RyanM View Post
      You created three separate threads for help working with ATM strategies. Since it's all related to the same topic, can you please keep ATM questions in one thread for better continuity.
      Originally posted by NinjaTrader_RyanM View Post
      I answered these in all your separate threads. Please see those threads for reference.




      If you have any further issues with atm strategies, please use this thread only.
      The title of this thread is Consolidated ATM questions as per your instructions.

      That said, Thanks for the information.

      Regards,
      TMFT

      Comment


        #4
        Thanks to Ryan_M

        Ryan,
        Your efforts were not in vain. With the information you provided I was able to finish my system and get everything working perfectly.

        Attached is a pic of the trading platform I built for discretionary trading. I trade on range bars and needed a way to manually enter orders at the projected range bar close without hitting the wrong key or missing a trade because I was too slow and clumsy to work the keyboard like a video game.

        I can now click on the buttons on the lower tool bar to place a stop order at the projected close of the range bar with just one click. If the value changes before the end of the bar, the system changes the order automatically for me. It also locks out the other keys until the system is flat so I don't inadvertently hit the wrong key or enter unintentional multiple orders.

        Once I press the button, I can cancel at any time by hitting the same key again.

        I put a mini data box in the top tool bar, so I don't have to look away to see the numbers.

        The order info is displayed on the lower tool bar next to the buy/sell buttons.

        I also did the screen gradient myself. It changes color in sync with the indicators I wrote.

        ... and they said you can't teach and old dog new tricks...


        Thanks for your efforts.

        Regards,
        TMFT
        Attached Files

        Comment


          #5
          Looks good, TMFT. Thanks for sharing the details of your project and glad to hear you were able to see it to fruition.
          Ryan M.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by f.saeidi, Today, 12:14 PM
          2 responses
          5 views
          0 likes
          Last Post f.saeidi  
          Started by TradeForge, 04-19-2024, 02:09 AM
          2 responses
          28 views
          0 likes
          Last Post TradeForge  
          Started by aprilfool, 12-03-2022, 03:01 PM
          3 responses
          327 views
          0 likes
          Last Post NinjaTrader_Adrian  
          Started by giulyko00, Today, 12:03 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by AnnBarnes, Today, 12:17 PM
          1 response
          2 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Working...
          X