Announcement

Collapse
No announcement yet.

Problem with Projection oscillator/bands

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Projection oscillator/bands

    Hallo

    I wonder if anyone could help me with the projection oscillator.
    instead of plotting above and below, in some cases, both of the projection bands plots beneath the Price (See attachment), which is probably provoked by some sort of error in the script.


    I hope some of you guys can point your finger at it.

    Kind regards

    Gotan4711
    Attached Files

  • #2
    Gotan4711
    The issue you are seeing is due to errors in the equations that calculate Value2 and Value3 which should be written as shown below



    FWIW also the formula for the Projection Oscillator has errors
    One is that the transfer of values at BARSTATE_NEWBAR is performed at the wrong time as it needs to occur before those values are calculated and not after. Also the related variables all need to be global.
    See the explanation and solution provided in this thread on virtually the same issue
    Another is that in the equation for the Slow Projection Oscillator [SlowPO] you are subtracting the previous value of the Projection Oscillator [PO1] from the current value of the Projection Oscillator [PO] whereas you should be subtracting the previous value of the Slow Projection Oscillator [SlowPO1] from the current value of the Projection Oscillator
    Alex


    Originally posted by gotan4711 View Post
    Hallo

    I wonder if anyone could help me with the projection oscillator.
    instead of plotting above and below, in some cases, both of the projection bands plots beneath the Price (See attachment), which is probably provoked by some sort of error in the script.


    I hope some of you guys can point your finger at it.

    Kind regards

    Gotan4711

    Comment


    • #3
      Thanks a lot Alexis. As you can see it really fixed the problem. I only adjusted Value 2&3 line in both scripts, so even though I haven't fixed the other error you mention, the bands and the oscillator looks ok to me.
      It's too bad you don't teach this programming stuff in a more direct way. I certainly wouldn't mind paying you for private lessons. Anyway I have another question for you.

      Larry Connors is a highly respected researcher within the trading community. He is famous for his "Connors RSI" as well as "RSI 2". I happen to locate the Metastock formula for "Connors RSI". Would it be possible for you to assist me in translating that into an efs study. The formula looks like this:

      data:=CLOSE;

      lenRSI:=3;
      lenStreak:=2;
      lenPctRank:=100;

      WildersRSI:=RSI(data, lenRSI);

      ch:=ROC(data,1,%);

      up:=BarsSince(ch<=0);
      dn:=BarsSince(ch>=0);
      StreakRSI:=RSI(up-dn, lenStreak);

      count:=Sum(ch<LastValue(ch+PREV*0),lenPctRank);
      PctRank:=100 * count / lenPctRank;

      ConnorsRSI:=(WildersRSI + StreakRSI + PctRank) / 3;

      {plot}
      ConnorsRSI;


      Kind regards

      Gotan4711




      Originally posted by Alexis C. Montenegro View Post
      Gotan4711

      The issue you are seeing is due to errors in the equations that calculate Value2 and Value3 which should be written as shown below



      FWIW also the formula for the Projection Oscillator has errors
      One is that the transfer of values at BARSTATE_NEWBAR is performed at the wrong time as it needs to occur before those values are calculated and not after. Also the related variables all need to be global.
      See the explanation and solution provided in this thread on virtually the same issue
      Another is that in the equation for the Slow Projection Oscillator [SlowPO] you are subtracting the previous value of the Projection Oscillator [PO1] from the current value of the Projection Oscillator [PO] whereas you should be subtracting the previous value of the Slow Projection Oscillator [SlowPO1] from the current value of the Projection Oscillator
      Alex
      Attached Files

      Comment


      • #4
        Gotan4711
        As I indicated in my previous reply the oscillator script contains errors and is returning incorrect results
        With regards to the Connors RSI I see that you have already posted about it elsewhere in this board. FYI as suggested in the eSignal Central Forums Etiquette, Rules & Guidelines you should avoid duplicating posts to multiple forums or threads. Furthermore the appropriate place for these kind of requests is the New Study Suggestion forum
        That said thank you for your vote of confidence but regretfully I am not available outside of this forum and/or for custom programming
        Alex


        Originally posted by gotan4711 View Post
        Thanks a lot Alexis. As you can see it really fixed the problem. I only adjusted Value 2&3 line in both scripts, so even though I haven't fixed the other error you mention, the bands and the oscillator looks ok to me.
        It's too bad you don't teach this programming stuff in a more direct way. I certainly wouldn't mind paying you for private lessons. Anyway I have another question for you.

        Larry Connors is a highly respected researcher within the trading community. He is famous for his "Connors RSI" as well as "RSI 2". I happen to locate the Metastock formula for "Connors RSI". Would it be possible for you to assist me in translating that into an efs study. The formula looks like this:

        data:=CLOSE;

        lenRSI:=3;
        lenStreak:=2;
        lenPctRank:=100;

        WildersRSI:=RSI(data, lenRSI);

        ch:=ROC(data,1,%);

        up:=BarsSince(ch<=0);
        dn:=BarsSince(ch>=0);
        StreakRSI:=RSI(up-dn, lenStreak);

        count:=Sum(ch<LastValue(ch+PREV*0),lenPctRank);
        PctRank:=100 * count / lenPctRank;

        ConnorsRSI:=(WildersRSI + StreakRSI + PctRank) / 3;

        {plot}
        ConnorsRSI;



        Kind regards

        Gotan4711

        Comment

        Working...
        X