Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Predictive Indicator for RSI

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

    Predictive Indicator for RSI

    Has anyone seen a NinjaTrader Script for the Predictive RSI Indicator (see code)?You can read more about it at http://www.protradingindicators.com/...predictive-rsi. Does anyone know if someone has coded this here? It looks interesting.


    /************************************************** *****************
    Description : This Indicator plots the Reverse Engineering RSI
    Provided By : TS Support, LLC for eSignal
    ************************************************** ******************/

    function preMain(){
    setPriceStudy(true);
    setStudyTitle("Reverse Engineering RSI");
    setCursorLabelName("RSI",0);
    setDefaultBarFgColor(Color.red,0);
    }

    var AUC_1 = 0;
    var ADC_1 = 0;

    function main(value,WildPer){
    if(value == null)
    value = 50;
    if(WildPer == null)
    WildPer = 14;

    ExpPer = 2 * WildPer - 1;
    K = 2 / (ExpPer + 1);

    if(close() > close(-1)){
    AUC = K * (close() - close(-1)) + (1 - K) * AUC_1;
    ADC = (1 - K) * ADC_1;
    }
    else {
    AUC = (1 - K) * AUC_1;
    ADC = K * (close(-1) - close()) + (1 - K) * ADC_1;
    }


    x = (WildPer - 1) * (ADC * value / (100 - value) - AUC);

    if(x >= 0)
    RevEngRSI = close() + x;
    else
    RevEngRSI = close + x * (100 - value) / value;

    if (getBarState() == BARSTATE_NEWBAR){
    AUC_1 = AUC;
    ADC_1 = ADC;
    }

    return RevEngRSI;
    }

    #2
    jeremiah, this should be found already in the sharing if I'm not mistaken...it would be the April 2008 TASC contribution from us -

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks so much Bertrand.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by TraderG23, 12-08-2023, 07:56 AM
      9 responses
      382 views
      1 like
      Last Post Gavini
      by Gavini
       
      Started by oviejo, Today, 12:28 AM
      0 responses
      1 view
      0 likes
      Last Post oviejo
      by oviejo
       
      Started by pechtri, 06-22-2023, 02:31 AM
      10 responses
      125 views
      0 likes
      Last Post Leeroy_Jenkins  
      Started by judysamnt7, 03-13-2023, 09:11 AM
      4 responses
      59 views
      0 likes
      Last Post DynamicTest  
      Started by ScottWalsh, Yesterday, 06:52 PM
      4 responses
      36 views
      0 likes
      Last Post ScottWalsh  
      Working...
      X