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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    49 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    15 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    21 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X