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 terofs, Yesterday, 04:18 PM
      1 response
      21 views
      0 likes
      Last Post terofs
      by terofs
       
      Started by CommonWhale, Today, 09:55 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by Gerik, Today, 09:40 AM
      2 responses
      7 views
      0 likes
      Last Post Gerik
      by Gerik
       
      Started by RookieTrader, Today, 09:37 AM
      2 responses
      13 views
      0 likes
      Last Post RookieTrader  
      Started by alifarahani, Today, 09:40 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X