Announcement

Collapse
No announcement yet.

Anyone using Universal Global Variable to keep track of position status Realtime?

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

  • Anyone using Universal Global Variable to keep track of position status Realtime?

    I would like to be able to run multiple strategies loaded into 2 seperate charts with the same symbol keeping track of position status and also being able to manually reload the strategy EFS via right-click reload.

    Initially I would like replicate the boolean values returned by the backtester methods: StrategyisLong(), StrategyisShort() and StrategyisInPosition(), and later on keeping track of the position size.

    Using Universal golbal variable functions setGlobalVariable(), getGlobalVariable() etc., I was planning to define 3 variables:

    StrategyisLong+getsymbol()+getInvokerId()
    StrategyisShort+getsymbol()+getInvokerid()
    StrategyisInPosition+getsymbol()+getInvokerID()

    It's unclear to me where in the EFS, premain, bInit (one time only), main, etc I should initially setGlobalVariable() which seems to be the function that defines the variables?

    If I setGlobalVariable() in bInit, will a manual reload cause setGlobalVariable() to reinitialize?

    If true, could I use another variable via setGlobalVariable() for the bInit flag to prevent the StrategisLong+getsymbol()+getInvokerId() variable from being reinitialized.

    Should removeGlobalVariable() also be used in the PostMain to remove the variables?

    If anyone has any examples of using Global variables in this manner it would be appreciated.

    Thanks,


    Glen
    Last edited by demarcog; 01-26-2007, 10:51 AM.
    Glen Demarco
    [email protected]
Working...
X