Announcement

Collapse
No announcement yet.

Higher time frame - inv() ?!

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

  • Higher time frame - inv() ?!

    Hi ,

    I tried to go through the interval new function in EFS but with no luck .

    I'm trying to get a signal ( Up or Down ) when StochStudy.FAST < StochStudy.SLOW for the 15 min chart and the 30 min chart but I'm facing errors all the time .

    Can you help me out in my code .

    Regards,


    var vStoch8_3 = new StochStudy(8, 3, 3);
    var vLastAlert = -1;



    function preMain() {

    setPriceStudy(true);
    setStudyTitle("JIR - ALL NEW");


    }

    function main() {

    if (
    vStoch8_3.getValue(StochStudy.FAST) < vStoch8_3.getValue(StochStudy.SLOW) &&
    vStoch8_3.getValue(StochStudy.FAST) > 75 &&
    vStoch8_3.getValue(StochStudy.FAST, inv(15)) < vStoch8_3.getValue(StochStudy.SLOW, inv(15))
    ) onAction1()

    else if (
    vStoch8_3.getValue(StochStudy.FAST) > vStoch8_3.getValue(StochStudy.SLOW) &&
    vStoch8_3.getValue(StochStudy.FAST) < 20 &&
    vStoch8_3.getValue(StochStudy.FAST) > vStoch8_3.getValue(StochStudy.SLOW, inv(15))
    ) onAction2();


    return null;


    }

    function postMain() {

    }

    function onAction1() {
    drawTextRelative(0, high(), "Down", Color.RGB(155,0,0), Color.RGB(255,255,255), Text.LEFT, "Arial", 10);
    vLastAlert = 1;
    }

    function onAction2() {
    drawTextRelative(0, low(), "Up", Color.RGB(0,128,0), Color.RGB(255,255,255), Text.LEFT, "Arial", 10);
    vLastAlert = 2;
    }

  • #2
    basel_jir
    The script you posted is based on the EFS1 version of the Stochastic study. To use the new sym() or inv() functions you need to use the EFS2 version of the study.
    For information on EFS2 and the syntax required see the EFS2 Function Reference section in the EFS KnowledgeBase
    Alex

    Comment


    • #3
      how can i use EFS2 - i have E.Singal 7.9

      I downloaded the new esignal 7.9 and i'm using efs formula edit box . is there a way else to use efs (EFS2) .

      i cheked inv( interval ) help and ran through examples but still i can't make it with Stochastics .


      may you send me any example of how to use inv() function in EFS 2?

      Comment


      • #4
        Have you seen the help file here....

        Comment


        • #5
          EFS2 - new lanuage

          Hi all ,

          I found out that EFS2 is some how derived from JAVA script and it is far more complecated than EFS .

          is there any site give the opportunities to learn by example . if not any advise to learn this lanuage to update my indicator to fit the new EFS2 and to use inv() function .

          regards,

          Comment


          • #6
            basel_jir
            Actually both EFS1 and EFS2 are based on JavaScript and out of experience I believe that EFS2 is far simpler than EFS1 especially when it comes to using multiple intervals, external symbols, creating studies on studies, studies on custom variables, etc.
            FYI if you have installed version 7.9 then you already have in the EFS2 Custom folder a Stochastic study set up for use with multiple intervals and/or external symbols.
            Alex

            Comment

            Working...
            X