StockFetcher Forums · General Discussion · Custom ROC<< >>Post Follow-up
423 posts
msg #157340
Ignore snappyfrog
8/7/2021 10:57:05 AM

Edit: Sorry, but I found a conversation located here -

I have this custom ROC in ThinkorSwim and want to try to convert it over to SF.

#--Input variables
input rocLength1 = 10;
input rocLength2 = 15;
input rocLength3 = 20;
input rocLength4 = 30;

def sumRocLength = rocLength1+rocLength2+rocLength3+rocLength4;
def avgLength1 = 10;
def avgLength2 = 10;
def avgLength3 = 10;
def avgLength4 = 15;

#--Calc ROC - RateOfChange(length, color norm length, price)
def ROC1 = RateOfChange(rocLength1, rocLength1, close);
def ROC2 = RateOfChange(rocLength2, rocLength2, close);
def ROC3 = RateOfChange(rocLength3, rocLength3, close);
def ROC4 = RateOfChange(rocLength4, rocLength4, close);

#--Plot lines
plot zeroLine = 0;

plot fastKST = (Average(ROC1,avgLength1)*(rocLength1/sumRocLength))+

plot slowKST = Average(fastKST,rocLength1);

StockFetcher Forums · General Discussion · Custom ROC<< >>Post Follow-up

*** Disclaimer *** does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. does not recommend particular securities., Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.

Copyright 2021 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.