Announcement

Collapse
No announcement yet.

How do I create CI on RSI, add MA, bars to RSI

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

  • How do I create CI on RSI, add MA, bars to RSI

    Hi, need help with two things. Took your EFS JavaScript tutorials plus 30 of 40 NewBoston, searched your library, & examined programs similar to what I want to do in your script editors. Have a basic understanding of JavaScript theory but still don't know how to write what I want. I have the functions, variables, & parameters, but don't know how to arrange them or write them without errors.

    1 I'm trying to create a Composite Index on an RSI. This is straight out of Connie Brown's book. She gives the functions & parameters for TradeStation, which I guess writes in Easy. Here's what I want (Connie Booth's functions for TradeStation in parenthesis):
    a) create 9-period MOMENTUM on 14-period RSI based on closing (varRSIMO9=MOMENTUM(RSI(CLOSE,14),9)
    b) create 3-period RSI with 3-period SIMPLE MOVING AVERAGE on the RSI to smooth (varRSI3=AVERAGE(RSI(CLOSE,3),3)
    c) add a) + b) to create Composite Index & plot as black line (varRSIMO9+varRS13,"Plot1")
    d) add 33-period EXPONENTIAL MOVING AVERAGE & 13-period SIMPLE MOVING AVERAGE both on the Composite Index, the 33 in light green, the simple in light blue

    2 I want to add/subtract the following to a basic 14-period RSI:
    a) get rid of the existing dotted horizontal lines at 30 & 70
    b) replace them with light green horizontal bands whose width will be between 40-50 & 80-90; & light pink bands whose width will be between 55-65 & 20-30 (I think I saw how to do this part but not sure)
    c) add a 33-period EXPPONENTIAL MOVING AVERAGE in green & a 13-period SIMPLE MOVING AVERAGE in blue, both on the RSI
    d) would like the option to reduce the RSI scale to 10-100 on occasion

    Thanks! in advance.

  • #2
    power-of-silence
    1. Search the forum for keywords like “composite index” or “constance” and you will find that one or more instances of the study are already available.
    2. With the exception of the bands you can accomplish the second study without the need of an efs by simply using the study on study functionality that is available with built-in studies (see the link to the related article in the eSignal KnowledgeBase). That said you should also search the forum as there are already a number of scripts readily available that show how to calculate an rsi and its average and that you could use as examples to create your own.
    With regards to the bands the only way you would be able to do it with the exact values would be using the setBarBgColor() function together with the optional yMin and yMax parameters (see the link to the related article in the EFS KnowledgeBase for the description and syntax of the function)
    Alex


    Originally posted by power-of-silence View Post
    Hi, need help with two things. Took your EFS JavaScript tutorials plus 30 of 40 NewBoston, searched your library, & examined programs similar to what I want to do in your script editors. Have a basic understanding of JavaScript theory but still don't know how to write what I want. I have the functions, variables, & parameters, but don't know how to arrange them or write them without errors.

    1 I'm trying to create a Composite Index on an RSI. This is straight out of Connie Brown's book. She gives the functions & parameters for TradeStation, which I guess writes in Easy. Here's what I want (Connie Booth's functions for TradeStation in parenthesis):
    a) create 9-period MOMENTUM on 14-period RSI based on closing (varRSIMO9=MOMENTUM(RSI(CLOSE,14),9)
    b) create 3-period RSI with 3-period SIMPLE MOVING AVERAGE on the RSI to smooth (varRSI3=AVERAGE(RSI(CLOSE,3),3)
    c) add a) + b) to create Composite Index & plot as black line (varRSIMO9+varRS13,"Plot1")
    d) add 33-period EXPONENTIAL MOVING AVERAGE & 13-period SIMPLE MOVING AVERAGE both on the Composite Index, the 33 in light green, the simple in light blue

    2 I want to add/subtract the following to a basic 14-period RSI:
    a) get rid of the existing dotted horizontal lines at 30 & 70
    b) replace them with light green horizontal bands whose width will be between 40-50 & 80-90; & light pink bands whose width will be between 55-65 & 20-30 (I think I saw how to do this part but not sure)
    c) add a 33-period EXPPONENTIAL MOVING AVERAGE in green & a 13-period SIMPLE MOVING AVERAGE in blue, both on the RSI
    d) would like the option to reduce the RSI scale to 10-100 on occasion

    Thanks! in advance.

    Comment

    Working...
    X