Announcement

Collapse
No announcement yet.

EFS works in v10.6 but not in v11

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

  • EFS works in v10.6 but not in v11

    OK, I like ver. 11 but some EFS studies I have do not work there. Like the one below for example. Is there a fix for this or another way I should be coding this?
    Thanks,
    Mark
    --------------------------------
    function preMain() {
    setPriceStudy(true);
    setStudyTitle("Momentum.efs");
    setDefaultPriceBarColor( Color.grey );
    //setComputeOnClose();
    }

    function main() {
    if(open(0)>close(0)) {setPriceBarColor(Color.red)}
    if(open(0)<close(0)) {setPriceBarColor(Color.green)}
    if(close(0)<=(low(-1)-(high(-1)-low(-1)))){setPriceBarColor(Color.yellow)}
    if(close(0)>=((high(-1)-low(-1))+high(-1))){setPriceBarColor(Color.white)}

    return null}

  • #2
    Re: EFS works in v10.6 but not in v11

    DerferMark
    When painting bars you need to use the setColorPriceBars(true) statement in preMain (see this article in the EFS KnowledgeBase)
    While it did work without that statement in version 10.6 or earlier it did so intermittently and it was actually a bug
    Alex


    Originally posted by DerferMark
    OK, I like ver. 11 but some EFS studies I have do not work there. Like the one below for example. Is there a fix for this or another way I should be coding this?
    Thanks,
    Mark
    --------------------------------
    function preMain() {
    setPriceStudy(true);
    setStudyTitle("Momentum.efs");
    setDefaultPriceBarColor( Color.grey );
    //setComputeOnClose();
    }

    function main() {
    if(open(0)>close(0)) {setPriceBarColor(Color.red)}
    if(open(0)<close(0)) {setPriceBarColor(Color.green)}
    if(close(0)<=(low(-1)-(high(-1)-low(-1)))){setPriceBarColor(Color.yellow)}
    if(close(0)>=((high(-1)-low(-1))+high(-1))){setPriceBarColor(Color.white)}

    return null}

    Comment


    • #3
      Thanks Alex - that worked!! I was hoping it was something simple.

      Comment


      • #4
        DerferMark
        You are welcome
        Alex


        Originally posted by DerferMark
        Thanks Alex - that worked!! I was hoping it was something simple.

        Comment

        Working...
        X