Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GetAtmStrategy...

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

    GetAtmStrategy...

    Hello,

    Please tell me what I'm doing wrong...
    I'm trying a simple piece of code to understand GetAtmStrategy...
    I'm receiving a method error that the Id doesn't exist for the following.


    Code:
    if (FirstTickOfBar)
    			{
    				if (atmStrategyId.Length ==0)
    				{	
    					atmStrategyId = GetAtmStrategyUniqueId();
    			
    				}
    				
    				if (atmStrategyId.Length > 0)
    				{
    					
    					Print("GetAtmStrategyMarketPosition(atmStrategyId)\t" +GetAtmStrategyMarketPosition(atmStrategyId));
    					Print("atmStrategyId\t" +atmStrategyId);
    					atmStrategyId = string.Empty;
    				}
    				//else {atmStrategyId = string.Empty;}
    			}
    Here's the error message: http://screencast.com/t/IONsnRHFO

    Thanks for your help.

    Kirk
    Last edited by zeller4; 11-12-2011, 03:29 PM.

    #2
    Originally posted by zeller4 View Post
    Hello,

    Please tell me what I'm doing wrong...
    I'm trying a simple piece of code to understand GetAtmStrategy...
    I'm receiving a method error that the Id doesn't exist for the following.


    Code:
    if (FirstTickOfBar)
                {
                    if (atmStrategyId.Length ==0)
                    {    
                        atmStrategyId = GetAtmStrategyUniqueId();
                
                    }
                    
                    if (atmStrategyId.Length > 0)
                    {
                        
                        Print("GetAtmStrategyMarketPosition(atmStrategyId)\t" +GetAtmStrategyMarketPosition(atmStrategyId));
                        Print("atmStrategyId\t" +atmStrategyId);
                        atmStrategyId = string.Empty;
                    }
                    //else {atmStrategyId = string.Empty;}
                }
    Here's the error message: http://screencast.com/t/IONsnRHFO

    Thanks for your help.

    Kirk
    first you are assigning the atmStrategyId a value. but no orders/trades exists with that newly created value. so the second part of the code throws an error. there should be an entry order in between.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    59 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    161 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    97 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X