Announcement

Collapse
No announcement yet.

hhv, llv, or donchian on a custom variable

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

  • hhv, llv, or donchian on a custom variable

    I've a script that works. Its a price study.

    The last three lines are

    vCall = something;
    vPut = something;

    return new array(vCall, vPut);



    I now need to modify to also plot the highest high of vCall over the last 20 periods

    I'm trying to use either the hhv() function or the Donchian function.
    No matter how I code it, it does not work, even after searching the board and help files.

    Do the hhv() and upperDonchian functions work on a custom variable? And how would one go about doing this using these functions?


    Thanks

    bigtee

  • #2
    Re: hhv, llv, or donchian on a custom variable

    bigtee

    Do the hhv() and upperDonchian functions work on a custom variable?
    Yes they do however the variable needs to be a series to be able to use it as a custom source in those functions.
    To create the series you need to calculate those variables in a separate function or an external efs which you then call using the efsInternal() or efsExternal() functions (see the links to the respective articles in the EFS KnowledgeBase for the description and syntax of the functions). You can also find a detailed description of these functions in this thread and some practical examples of their use in this thread. Also run a search in the forum for the keywords efsinternal* or efsexternal* and you will find numerous other examples
    The efsInternal() and efsExternal() functions will create the required series which you can then use as the source of the hhv() or upperDonchian() functions
    Alex


    Originally posted by bigtee
    I've a script that works. Its a price study.

    The last three lines are

    vCall = something;
    vPut = something;

    return new array(vCall, vPut);



    I now need to modify to also plot the highest high of vCall over the last 20 periods

    I'm trying to use either the hhv() function or the Donchian function.
    No matter how I code it, it does not work, even after searching the board and help files.

    Do the hhv() and upperDonchian functions work on a custom variable? And how would one go about doing this using these functions?


    Thanks

    bigtee

    Comment


    • #3
      Thanks Alex.

      got it to work.

      bigtee

      Comment


      • #4
        bigtee
        You are most welcome
        Alex


        Originally posted by bigtee
        Thanks Alex.

        got it to work.

        bigtee

        Comment

        Working...
        X