Announcement

Collapse
No announcement yet.

RSI on the last three Volume bars

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

  • RSI on the last three Volume bars

    Hi everybody,

    it shouldn't be such a problem, but somehow I can't get it working:

    I would like to add the Volume of the last three bars
    (3Vol = volume()+volume(-1)+volume(-2))

    and do an RSI on it
    (RSI of 3Vol )



    Who can help, or knows a link, or can tell me if this does not work !?

    Best Regards
    Roger

  • #2
    Roger
    You should be able to easily do that with the RSIEnhanced.efs that is in the Library subfolder of Formulas. Open it with the Editor and replace the lines
    var dClose = close(0);
    var dPrevClose = close(-1);

    with
    var dClose = volume(0)+volume(-1)+volume(-2);
    var dPrevClose = volume(-1)+volume(-2)+volume(-3);

    That should return the RSI of the sum of the last three volume bars
    Alex

    Comment


    • #3
      Roger
      FWIW once EFS2 is released with version 7.9 which is currently in beta testing the formula will be much easier to write as shown in the example below
      Alex

      PHP Code:
      function preMain() {
          
      setPriceStudy(false);
          
      setStudyTitle("RSI of 3bar Vol");
          
      setCursorLabelName("RSIvol"0);
          
      setStudyMin(0);
          
      setStudyMax(100);
      }

      function 
      main() {

          return 
      rsi(14,efsInternal("volsum")); 
      }

      function 
      volsum(){

          return (
      volume(0)+volume(-1)+volume(-2));

      Comment


      • #4
        Thanks Alexis, it is working now.

        Roger

        Comment

        Working...
        X