Announcement

Collapse
No announcement yet.

apparent catch 22 when back testing

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

  • apparent catch 22 when back testing

    I have an indicator that sets the pricebar color according to some rules. Traditionally this code did not "return" a value.
    Now I would like to use this indicator with the back test facility.

    I started by declaring the study in a call to efsexternal. The value, of course, was always null.

    I modified the study to return a quoted string indicating the color -- the value continued to always be null!

    I modified the study further to return numeric values indicative of the color. Now the efsExternal series provided the correct numeric value!

    Unfortunately, my study is now useless as an indicator because when applied to a chart the returned values completely mess up the displayed range on the chart.

    Does anyone have any suggestions to get around this apparent catch 22?

  • #2
    Re: apparent catch 22 when back testing

    Gordie
    The efsInternal() and efsExternal() functions only retrieve values [returned by a function or efs] that are numbers.
    In your case the solution is to either incorporate the logic that colors the price bars in the efs you are using for back testing or use the call() or callFunction() functions which can also retrieve strings. Keep in mind that these functions do not create a series [like efsExternal()] but return a single value. For the description and syntax of these functions see the links to the corresponding articles in the EFS KnowledgeBase.
    Alex


    Originally posted by gboast
    I have an indicator that sets the pricebar color according to some rules. Traditionally this code did not "return" a value.
    Now I would like to use this indicator with the back test facility.

    I started by declaring the study in a call to efsexternal. The value, of course, was always null.

    I modified the study to return a quoted string indicating the color -- the value continued to always be null!

    I modified the study further to return numeric values indicative of the color. Now the efsExternal series provided the correct numeric value!

    Unfortunately, my study is now useless as an indicator because when applied to a chart the returned values completely mess up the displayed range on the chart.

    Does anyone have any suggestions to get around this apparent catch 22?

    Comment

    Working...
    X