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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    388 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    260 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    218 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    302 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    268 views
    0 likes
    Last Post CarlTrading  
    Working...
    X