Announcement

Collapse
No announcement yet.

Parabolic calculated on low only

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

  • Parabolic calculated on low only

    Hi there,

    Do you know how to change this formula to calculate the oscillator
    based on " < low" only, rather than both low and high?
    I would like to have one oscillator that displays only buy, not buy and sell.
    Thank you
    Peter

    var vParSAR = new ParabolicStudy(0.02, 0.02, 0.2);
    var vLastAlert = -1


    function preMain() {

    setPriceStudy(true);
    setStudyTitle("AUD");
    setCursorLabelName("AUD", 0);

    setDefaultBarFgColor(Color.blue, 0);
    setDefaultBarThickness(3, 0);
    setPlotType(PLOTTYPE_LINE, 0);

    }

    function main() {


    if (
    vParSAR.getValue(ParabolicStudy.STOP) < low()
    ) onAction1()

    else if (
    vParSAR.getValue(ParabolicStudy.STOP) > high()
    ) onAction2();
    return vParSAR.getValue(ParabolicStudy.STOP);
    }

    function postMain() {

    }


    function onAction1() {
    if (vLastAlert != 1) Alert.playSound("C:\\Program Files\\eSignal\\Sounds\\BAUD.wav");
    if (vLastAlert != 1) drawTextRelative(0, open(0), "B", Color.RGB(0,0,0), Color.RGB(25,200,25), Text.LEFT, "Arial", 34);
    vLastAlert = 1;
    }

    function onAction2() {
    if (vLastAlert != 2) Alert.playSound("C:\\Program Files\\eSignal\\Sounds\\SAUD.wav");
    if (vLastAlert != 2) drawTextRelative(0, open(0), "S", Color.RGB(255,0,0), Color.RGB(0,0,0), Text.LEFT, "Arial", 34);
    vLastAlert = 2;
    }

  • #2
    I would suggest commenting out the relevant lines that produce the sell signal, and go with that. To comment out a line just put a double slash in front of it. Here's a solution...

    PHP Code:
    var vParSAR = new ParabolicStudy(0.020.020.2);
    var 
    vLastAlert = -1

    function preMain() {

        
    setPriceStudy(true);
        
    setStudyTitle("AUD");
        
    setCursorLabelName("AUD"0);
        
        
    setDefaultBarFgColor(Color.blue0);
        
    setDefaultBarThickness(30);
        
    setPlotType(PLOTTYPE_LINE0);

    }

    function 
    main() {

        
        if (
            
    vParSAR.getValue(ParabolicStudy.STOP) < low()
        ) 
    onAction1()
        
        
    // else if (
        // vParSAR.getValue(ParabolicStudy.STOP) > high()
        // ) onAction2();
        // return vParSAR.getValue(ParabolicStudy.STOP); 
    }


    function 
    onAction1() {
        if (
    vLastAlert != 1Alert.playSound("C:\\Program Files\\eSignal\\Sounds\\BAUD.wav");
        if (
    vLastAlert != 1drawTextRelative(0open(0), "B"Color.RGB(0,0,0), Color.RGB(25,200,25), Text.LEFT"Arial"34);
        
    vLastAlert 1;
    }

    // function onAction2() {
        // if (vLastAlert != 2) Alert.playSound("C:\\Program Files\\eSignal\\Sounds\\SAUD.wav");
        // if (vLastAlert != 2) drawTextRelative(0, open(0), "S", Color.RGB(255,0,0), Color.RGB(0,0,0), Text.LEFT, "Arial", 34);
        // vLastAlert = 2;
    // } 
    Regards,
    Jay F.
    Product Manager
    _____________________________________
    Have a suggestion to improve our products?
    Click Support --> Request a Feature in eSignal 11

    Comment


    • #3
      Thank you,

      I tried it already. It displays nothing, besides, even when
      double setup is changed from "<low" to for example high
      close, open, etc, it changes nothing.

      What I would like to set, is an oscillator that calculates only the lows of P@F charts (and then mirror copy for highs on the seperate oscillator). What I mean is two studies, one set to low
      and second to high price source

      However I would like to keep the same alarm system I have already.

      Regards,
      Peter
      [email protected]

      Comment

      Working...
      X