I think I am having a little problem with my static var code. I expected to see in an exploration with the variable "onshort" a value of 1 when a short  trade is on. Instead all I see is zeros in the exploration. I am not sure why. there are two parts to the code. If anyone can tell me what is  wrong with this code it would be appreciated.  thanks  
  
///part a-- 
StaticVarGet("onshort"); 
  
if( IsNull(  StaticVarGet("onshort"))) StaticVarSet("onshort",0); 
> 
  
//part b---  
 
if (LastValue(Short)) 
  
{StaticVarSet("onshort",1);} 
if (LastValue(Cover)) 
  
{StaticVarSet("onshort",0);} 
  
StaticVarGet("onshort"); 
 
    
    
 
__._,_.___
  
**** IMPORTANT PLEASE READ **** 
This group is for the discussion between users only. 
This is *NOT* technical support channel. 
 
TO GET TECHNICAL SUPPORT send an e-mail directly to  
SUPPORT {at} amibroker.com 
 
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at 
http://www.amibroker.com/feedback/ 
(submissions sent via other channels won't be considered) 
 
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: 
http://www.amibroker.com/devlog/ 
 
  
     
  
 
      
   
__,_._,___
 |