Los Angeles, California USA
Posts: 1 since Dec 2013
Thanks Given: 0
Thanks Received: 1
|
Hello everyone - I have just started looking at programing in ThinkScript - I have been using Worden2000 and programing there is very, very easy.
Currently on TOS I have a study that shows me an UP/DOWN ratio on the $VOLD (Up Volume - Down Volume).
It looks like this:
def U = close("$UVOL");
def D = close ("$DVOL");
def UDL = U - D;
def UDR = if U > D then U / D else -D / U;
input mode = {default Ratio, Issues};
def modeSwitch = if mode == mode.Ratio then 1 else 0;
AddLabel(yes, concat(
if modeSwitch then UDR else UDL, concat(" ",
if modeSwitch then ":1 U/D RATIO" else " U/D LINE")),
if modeSwitch then if UDR > UDR[1] then color.green else color.red else if UDL > UDL[1] then color.green else color.red);
plot null = double.nan;
This puts a green or red label on the $VOLD chart and gives me an indication of strength of the move - ie 2.2 to 1 or 3.5 to 1 etc, etc.
What I want to do, and I don't have a clue as to how to do it, is to actually PLOT the U/D ratio on a chart (line or candles) rather than just be a label.
I also have a similar ThinkScript for $ADVN-$DECN (advancers - decliners) (Also have it for Q's)
Can anyone point me in the right direction to get this plotted?
thanks
Harald
|