Announcement

Collapse
No announcement yet.

what do I use to call up the entry price value??

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

  • what do I use to call up the entry price value??

    I would like to call up the value of the entry price in my backtesting formula so that I can use that value and add that to another formula to set up a stop. What function do I use in EFS to call up that value so that I can put it in a formula?

    Thank you

  • #2
    oneeyewilly
    The value depends on which method of the Strategy Object you are using to enter the trade.
    If you are using Strategy.CLOSE you would use close(0), if Strategy.MARKET then you would use open(0) if on THISBAR and open(1) if on NEXTBAR.
    If instead you are using Strategy.STOP or Strategy.LIMIT then you would use the same stop or limit price you calculated and passed to the doLong(...) or doShort(...) commands. In this case you would also need to ensure that the range of the bar actually breaches those values.
    For more information and detailed examples on all the methods of the Strategy Object you may want to review the Back Testing Tutorials that are available in the EFS KnowledgeBase under Help Guides and Tutorials-> Beginner Tutorials
    Alex

    Comment

    Working...
    X