Re: Fun with ThinkScript February 03, 2016 06:22PM |
Registered: 8 years ago Posts: 161 |
Re: Fun with ThinkScript February 03, 2016 06:46PM |
Registered: 9 years ago Posts: 78 |
Re: Fun with ThinkScript February 03, 2016 11:53PM |
Registered: 10 years ago Posts: 143 |
Re: Fun with ThinkScript February 04, 2016 06:59AM |
Registered: 9 years ago Posts: 78 |
Re: Fun with ThinkScript February 04, 2016 08:26AM |
Registered: 10 years ago Posts: 143 |
Re: Fun with ThinkScript February 04, 2016 08:39AM |
Registered: 8 years ago Posts: 161 |
Re: Fun with ThinkScript February 04, 2016 08:49AM |
Registered: 10 years ago Posts: 143 |
Re: Fun with ThinkScript February 04, 2016 12:19PM |
Registered: 9 years ago Posts: 78 |
Re: Fun with ThinkScript February 04, 2016 05:45PM |
Registered: 8 years ago Posts: 161 |
Tanman, many thanks. This looks very promising. I will try it shortly- my head was spinning from the problem so I backed off the last day or so.Quote
Tanman
> baffled1,
>
> I tried the following on TOS and it worked! So
> potentially you can nestle the max's and put all
> variables in 1 line!
>
> def variable1 = open;
> def variable2 = close;
> def variable3 = high;
> def variable4 = low;
> def High1 = max(max(variable1, variable2),
> max(variable3, variable4));
Re: Directional Divergence Index ( DDI ) need a THINKORSWIM Script February 04, 2016 06:43PM |
Registered: 8 years ago Posts: 7 |
Re: Fun with ThinkScript February 04, 2016 09:27PM |
Registered: 10 years ago Posts: 63 |
Re: Fun with ThinkScript February 05, 2016 03:31PM |
Registered: 8 years ago Posts: 161 |
declare lower; def A = (close(“eur/usd”)/close(“eur/usd”)[1])*100.00; def B = (close(“nzd/usd”)/close(“nzd/usd”)[1])*100.00; def C = (close(“eur/nzd”)/close(“eur/nzd”)[1])*100.00; def D = (close(“gbp/nzd”)/close(“gbp/nzd”)[1])*100.00; def E = (close(“aud/jpy”)/close(“aud/jpy”)[1])*100.00; def F = (close(“gbp/jpy”)/close(“gbp/jpy”)[1])*100.00; def G = (close(“usd/chf”)/close(“usd/chf”)[1])*100.00; def H = (close(“nzd/chf”)/close(“nzd/chf”)[1])*100.00; def I = (close(“eur/gbp”)/close(“eur/gbp”)[1])*100.00; def J = (close(“nzd/cad”)/close(“nzd/cad”)[1])*100.00; def K = (close(“usd/cad”)/close(“usd/cad”)[1])*100.00; def L = (close(“gbp/usd”)/close(“gbp/usd”)[1])*100.00; def High1 = max(max(A,B ),max(C,D)); def High2 = max(max(E,F ),max(G,H)); def High3 = max(max(I,J ),max(K,L)); def High4 = max(High1,High2); def High5 = max(High2,High3); def High6 = max(High4,High5); plot High7 = High6;
Re: Fun with ThinkScript February 05, 2016 04:21PM |
Registered: 10 years ago Posts: 143 |
Re: Fun with ThinkScript February 05, 2016 05:08PM |
Registered: 8 years ago Posts: 161 |
Re: Fun with ThinkScript February 05, 2016 06:06PM |
Registered: 10 years ago Posts: 143 |
Re: Fun with ThinkScript February 06, 2016 03:28AM |
Registered: 8 years ago Posts: 161 |
Tanman, thanks for clarifying and I read the link page too. Guess I misunderstood the article. So what I don't get is if the premarket /ES trend is all that's needed to predict regular market /ES, why bother with the DAX? Just curious- I mean, I don't even have a dog in this fight because my (forex) market is continuous but I'd still like to understand what his point is? No biggie, just wondering, if you get a minute.Quote
TANMAN
> Thanks for the article. ...the correlation is almost instant so not
> useful for trading purposes...
> What he is saying in the article is that you can
> use the trend in FDAX to predict later trend in
> /ES during regular trading hours. This is true for
> regular /ES also because it will have the same
> pre-market trend as FDAX ,,,So you can use
pre-market trend in /ES to predict trend in /ES during
regular trading hours...
Re: Fun with ThinkScript February 06, 2016 09:05AM |
Registered: 10 years ago Posts: 143 |
Re: Fun with ThinkScript February 06, 2016 01:29PM |
Registered: 8 years ago Posts: 161 |
Re: Fun with ThinkScript February 06, 2016 02:20PM |
Registered: 8 years ago Posts: 161 |
declare lower; def myvolume = volume; def negbar = close<open; def posbar = close>open; def buysellR = volume*hlc3; def mycalc = if negbar then buysellR*(-1) else if posbar then buysellR else double.nan; plot myplot = mycalc[1]/mycalc; input AVG1 = 5; plot myplotAVG = average(myplot,AVG1); plot zeroline = 0;Baffled1 comments on proxy code: "Kurtosis? What, me worry? I don't trade the stinkin' emini." Laughs. "Kurtosis- that's a disease, right?"
Re: Fun with ThinkScript February 06, 2016 03:25PM |
Registered: 8 years ago Posts: 7 |
Re: Fun with ThinkScript February 06, 2016 04:53PM |
Registered: 8 years ago Posts: 161 |
declare lower; input fastLength = 12; input slowLength = 26; input MACDLength = 9; input averageType = AverageType.EXPONENTIAL; plot Value = MovingAverage(averageType, close, fastLength) - MovingAverage(averageType, close, slowLength); plot Avg = MovingAverage(averageType, Value, MACDLength); plot Diff = Value - Avg; plot ZeroLine = 0; Value.SetDefaultColor(GetColor(1)); Value.DefineColor("Positive and Up", Color.BLUE); Value.DefineColor("Positive and Down", Color.PLUM); Value.DefineColor("Negative and Down", Color.RED); Value.DefineColor("Negative and Up", Color.YELLOW); Value.AssignValueColor(if Value >= 0 then if Value > Value[1] then Value.color("Positive and Up" ) else Value.color("Positive and Down" ) else if Value < Value[1] then Value.color("Negative and Down" ) else Value.color("Negative and Up" )); ZeroLine.SetDefaultColor(GetColor(0)); Avg.SetDefaultColor(GetColor(8)); Diff.SetDefaultColor(GetColor(5)); Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM); Diff.SetLineWeight(3); Diff.DefineColor("Positive and Up", Color.GREEN); Diff.DefineColor("Positive and Down", Color.DARK_GREEN); Diff.DefineColor("Negative and Down", Color.RED); Diff.DefineColor("Negative and Up", Color.DARK_RED); Diff.AssignValueColor(if Diff >= 0 then if Diff > Diff[1] then Diff.color("Positive and Up" ) else Diff.color("Positive and Down" ) else if Diff < Diff[1] then Diff.color("Negative and Down" ) else Diff.color("Negative and Up" )); ZeroLine.SetDefaultColor(GetColor(0));
Swing low and higher low February 06, 2016 08:56PM |
Registered: 8 years ago Posts: 8 |
Re: Fun with ThinkScript February 07, 2016 03:46PM |
Registered: 8 years ago Posts: 8 |
Re: Fun with ThinkScript February 07, 2016 09:07PM |
Registered: 9 years ago Posts: 78 |
Re: Fun with ThinkScript February 08, 2016 01:13PM |
Registered: 10 years ago Posts: 464 |
Re: Fun with ThinkScript February 08, 2016 02:07PM |
Registered: 8 years ago Posts: 161 |
declare lower; input fastLength = 12; input slowLength = 26; input MACDLength = 9; input averageType = AverageType.EXPONENTIAL; plot Value = round(MovingAverage(averageType, close, fastLength) - MovingAverage(averageType, close, slowLength),2); plot Avg = MovingAverage(averageType, Value, MACDLength); plot Diff = Value - Avg; plot ZeroLine = 0; Value.SetDefaultColor(GetColor(1)); Avg.SetDefaultColor(GetColor(8)); Diff.SetDefaultColor(GetColor(5)); Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM); Diff.SetLineWeight(3); Diff.DefineColor("Positive and Up", Color.GREEN); Diff.DefineColor("Positive and Down", Color.DARK_GREEN); Diff.DefineColor("Negative and Down", Color.RED); Diff.DefineColor("Negative and Up", Color.DARK_RED); Diff.AssignValueColor(if Diff >= 0 then if Diff > Diff[1] then Diff.color("Positive and Up" ) else Diff.color("Positive and Down" ) else if Diff < Diff[1] then Diff.color("Negative and Down" ) else Diff.color("Negative and Up" )); ZeroLine.SetDefaultColor(GetColor(0));
Re: Fun with ThinkScript February 08, 2016 02:24PM |
Registered: 8 years ago Posts: 161 |
Re: Fun with ThinkScript February 09, 2016 09:23AM |
Registered: 10 years ago Posts: 464 |
Re: Fun with ThinkScript February 09, 2016 11:35AM |
Registered: 8 years ago Posts: 7 |
Re: Fun with ThinkScript February 09, 2016 01:04PM |
Registered: 8 years ago Posts: 161 |