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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    68 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    36 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    61 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X