Announcement

Collapse
No announcement yet.

writing my first strategy

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

  • writing my first strategy

    Hello,
    I am trying to write a simple strategy based on the relative values of several indicators I have previously written.

    Can some tell me how I can access the values of my indicators in a strategy?

    Thanks,

    Gordie

  • #2
    Hello Gordie,

    If the custom indicators are initialized through efsInternal(), then they are in the Series Object form. To reference the values of these series you would use the .getValue(nIndex) method. You would then use these values within conditional statements to evaluate your trade conditions. When those conditions are true you use the Strategy object methods to report the simulated trade information to the Strategy Analyzer. If you are new to back testing, please review the back testing tutorials at the links below my signature. You'll find some basic code examples of how to write conditional statements throughout the tutorials.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment

    Working...
    X