Announcement

Collapse
No announcement yet.

Price Study and non Price Study in Same EFS

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

  • Price Study and non Price Study in Same EFS

    Hi

    I am a novice EFS programmer - so please forgive me if this is an easy question. But I have developed a strategy which I wish to code up in the same chart, part of which is based upon MA type cross-overs, and combined with a version of MACD. As such I would ideally like to plot in both the setPriceStuday(False) little "price pane" at the bottom of the chart and at the same time plot in the setPriceStudy(true) main chart.

    I have tried experimenting with putting both in the premain but it seems to only take the last setPriceStudy setting. I can't search the forum on setPriceStudy as every post with some code comes up!!

    Is it possible to do this (fairly easily)

    Cheers

    Gary

  • #2
    Gary
    The short answer is that an efs can only be either a price or a non-price study [although in the latter case it can color the price bars].
    The easiest solution in your case IMHO is to just run two instances of the same study one set as a non-price study to plot the MACD and the other as a price study to plot the MAs. That said there are ways to have studies exchange data between them either through the efsExternal() or setGlobalValue()/getGlobalValue() functions
    Search the forums for keywords such as efsexternal or setglobalvalue and you should find a number of threads on the topic as it has been covered before
    Alex


    Originally posted by Gary6612 View Post
    Hi

    I am a novice EFS programmer - so please forgive me if this is an easy question. But I have developed a strategy which I wish to code up in the same chart, part of which is based upon MA type cross-overs, and combined with a version of MACD. As such I would ideally like to plot in both the setPriceStuday(False) little "price pane" at the bottom of the chart and at the same time plot in the setPriceStudy(true) main chart.

    I have tried experimenting with putting both in the premain but it seems to only take the last setPriceStudy setting. I can't search the forum on setPriceStudy as every post with some code comes up!!

    Is it possible to do this (fairly easily)

    Cheers

    Gary

    Comment


    • #3
      Many thanks for your prompt reply.

      Comment


      • #4
        Gary
        You are welcome
        Alex


        Originally posted by Gary6612 View Post
        Many thanks for your prompt reply.

        Comment

        Working...
        X