Help with syntax

This is the place to discuss EdgeRater Chart Script

Moderator: Chris White

Post Reply
Chris White
Posts: 200
Joined: Mon Nov 29, 2010 9:21 pm

Help with syntax

Post by Chris White »

Received this question from an EdgeRater user:

I need help with plotting a close on a chart

to me it should be:
C1: C,color.green;

but this does not seem to work

the other issue:

I am trying to replicate this statement in thinkscript:

def upperline = regression * stdDeviations (for a set length)

I would think it would be something like this:

Code: Select all

Mid : LRL(C, N, X);
SD:= C;
LR := REF(LRCWSD(C, N, SD), X);
SDX := REF(SD, X);
Upperline: Mid + (STANDARD_DEVIATION(C,N,X) * SDX.LASTVALUE);

Would appreciate any help you can provide
Chris White
Posts: 200
Joined: Mon Nov 29, 2010 9:21 pm

Re: Help with syntax

Post by Chris White »

You could use:

C1:C,colorGreen;

Or if you are not particular about the color of the line:

C;

Or, if you are not particular about renaming CLOSE to C1:

C,colorGreen;

The upper line of the linear regression is the number of standard deviations (constant) * the standard deviation.
So, that would be:

Upper : Mid + (P * SDX.LASTVALUE);

Where P is a parameter specifying the number of standard deviations to plot the upper line at.
Post Reply