Add Price and Fib percentage to autofib study


Category:
0
0

Pete

I have an auto fibonacci study and was hoping to add the price and the fib level percentage to it.  I would like to have it layed out the way TOS lays it out.

input sideline = no;

def f11 = 0.236;
def f12 = 0.382;
def f13 = 0.50;
def f14 = 0.618;
def f15 = 0.786;
def hh = HighestAll(high);
def ll = LowestAll(low);
plot H =
if isnaN(close) && sideline then
hh
else if !isnaN(close) && !sideline then
hh
else
double.NaN
;
plot L =
if isnaN(close) && sideline then
ll
else if !isnaN(close) && !sideline then
ll
else
double.NaN
;
plot P236 =
if isnaN(close) && sideline then
hh – ((hh – ll) * f11)
else if !isnaN(close) && !sideline then
hh – ((hh – ll) * f11)
else
double.NaN
;
plot P382 =
if isnaN(close) && sideline then
hh – ((hh – ll) * f12)
else if !isnaN(close) && !sideline then
hh – ((hh – ll) * f12)
else
double.NaN
;
plot P50 =
if isnaN(close) && sideline then
hh – ((hh – ll) * f13)
else if !isnaN(close) && !sideline then
hh – ((hh – ll) * f13)
else
double.NaN
;
plot P618 =
if isnaN(close) && sideline then
hh – ((hh – ll) * f14)
else if !isnaN(close) && !sideline then
hh – ((hh – ll) * f14)
else
double.NaN
;
plot P781 =
if isnaN(close) && sideline then
hh – ((hh – ll) * f15)
else if !isnaN(close) && !sideline then
hh – ((hh – ll) * f15)
else
double.NaN
;
p236.SetDefaultColor(Color.lIGHT_GRAY);
p382.SetDefaultColor(Color.lIGHT_GRAY);
p50.SetDefaultColor(Color.ORANGE);
p618.SetDefaultColor(Color.lIGHT_GRAY);
p781.SetDefaultColor(Color.lIGHT_GRAY);
H.SetDefaultColor(Color.MAGENTA);
L.SetDefaultColor(Color.MAGENTA);
p236.SetStyle(Curve.LONG_DASH);
p382.SetStyle(Curve.LONG_DASH);
p50.SetStyle(Curve.LONG_DASH);
p618.SetStyle(Curve.LONG_DASH);
p781.SetStyle(Curve.LONG_DASH);
H.SetStyle(Curve.SHORT_DASH);
L.SetStyle(Curve.SHORT_DASH);
H.SetLineWeight(2);
L.SetLineWeight(2);
p50.SetLineWeight(2);

 

Marked as spam
Posted by (Questions: 49, Answers: 42)
Asked on February 2, 2019 10:07 am
310 views
0
Private answer

It is not possible to ” have it layed out the way TOS lays it out”

The only way to display values on the price graph is using what is called a chart bubble. If you want to see what that looks like you can see an example in this video: https://www.hahn-tech.com/thinkorswim-overnight-range-scan-alert/

This request would take much more time than I am willing to do for no charge in our Q&A forum. You are welcome to submit this as a custom project request.

Marked as spam
Posted by (Questions: 37, Answers: 4086)
Answered on February 6, 2019 9:35 am