Re: Fun with ThinkScript June 04, 2015 11:17PM |
Registered: 10 years ago Posts: 615 |
Quote
Ralph53
I didn't describe this right. I wanted to place the line on the left side of the chart. On a 15 candle chart it would start on the 10th candle from the right and work left from there. I find that to many horizontal lines on a chart become a distraction and it would view better if some were on the left.
# 5 Cents Below Open # def OpenNeg5 = (open("period" = AggregationPeriod.DAY) - .05); def lastbar = HighestAll(if IsNaN(close) then 0 else BarNumber()); plot condition = if BarNumber() < lastbar - 10 then GetValue(OpenNeg5, BarNumber() - lastbar) else Double.NaN;
Thinkscript Problem June 02, 2015 11:51PM |
Registered: 8 years ago Posts: 59 |
Re: Thinkscript Problem June 03, 2015 01:23PM |
Registered: 10 years ago Posts: 615 |
Re: Thinkscript Problem June 03, 2015 11:14PM |
Registered: 8 years ago Posts: 59 |
Re: Thinkscript Problem June 04, 2015 12:47AM |
Registered: 10 years ago Posts: 615 |
MomentumSMA plot / alert help June 06, 2015 06:13PM |
Registered: 9 years ago Posts: 53 |
Re: MomentumSMA plot / alert help June 06, 2015 07:48PM |
Registered: 10 years ago Posts: 615 |
def condition4 = if reference Momentum(15) < MomentumSMA(15) then 1 else 0;
def condition4 = if reference Momentum(15) < MomentumSMA(15)[1] then 1 else 0;
Re: Fun with ThinkScript June 06, 2015 07:58PM |
Registered: 8 years ago Posts: 59 |
Re: MomentumSMA plot / alert help June 06, 2015 08:42PM |
Registered: 9 years ago Posts: 53 |
Re: MomentumSMA plot / alert help June 06, 2015 09:03PM |
Registered: 10 years ago Posts: 615 |
Quote
Palmer
The logic I am trying to code is when both the Momentum and its SMA are above the zero line and the Momentum has dipped below the SMA such as i nthis example:
def condition4 = if reference Momentum(15) crosses below MomentumSMA(15) then 1 else 0;
Need help with basic ThinkScript June 06, 2015 11:40PM |
Registered: 8 years ago Posts: 1 |
Re: Need help with basic ThinkScript June 07, 2015 05:07AM |
Registered: 10 years ago Posts: 615 |
Quote
kadosh
I need to modify the following section to correctly define the previous day's close
def CloseYesterday = close(period = AggregationPeriod.DAY)[1];
Quote
kadosh
I need to modify the following section in order to correctly define the current day's open
def OpenToday = open(period = AggregationPeriod.DAY);
Re: Need help with basic ThinkScript June 07, 2015 05:46AM |
Registered: 10 years ago Posts: 615 |
Quote
Ralph53
How can I have the price bubble from the price area appear on a chart in a fixed spot? Say 8 candles to the left and dead center in height? I would need to know how to alter the coordinates if I need to move it.
def X = HullMovingAvg() - HullMovingAvg()[1]
def X = HullMovingAvg() - HullMovingAvg()[1]; AddLabel(yes, "X: " + Round(X), Color.YELLOW);
input OffsetX = 8; input barsOnscreen = 48; def X = HullMovingAvg() - HullMovingAvg()[1]; def lastBar = HighestAll(if IsNaN(close) then 0 else BarNumber()); def bubbleBar = BarNumber() == lastBar - OffsetX; def height = (Highest(high, barsOnscreen) + Lowest(low, barsOnscreen)) / 2; AddChartBubble(bubbleBar, height, "X: " + Round(GetValue(X, -OffsetX)), Color.YELLOW);
Re: MomentumSMA plot / alert help June 07, 2015 08:31AM |
Registered: 9 years ago Posts: 53 |
Re: Need help with basic ThinkScript June 07, 2015 09:37AM |
Registered: 10 years ago Posts: 615 |
def Cond4 = MomentumSMA(close, 15, 15).momentum crosses below MomentumSMA(close, 15, 15).avg;
# # TD Ameritrade IP Company, Inc. (c) 2008-2015 # declare lower; input price = close; input momentumLength = 28; input smaLength = 28; assert(momentumLength > 0, "'momentum length' must be positive: " + momentumLength); plot Momentum = price - price[momentumLength]; plot Avg = Average(data = Momentum, length = smaLength); plot ZeroLine = 0; Momentum.SetDefaultColor(GetColor(1)); Avg.SetDefaultColor(GetColor(5)); ZeroLine.SetDefaultColor(GetColor(0));
def Cond4 = MomentumSMA(close, 15, 15).momentum crosses below MomentumSMA(close, 15, 15).avg;
Re: Fun with ThinkScript June 07, 2015 12:46PM |
Registered: 9 years ago Posts: 53 |
Re: Fun with ThinkScript June 07, 2015 02:20PM |
Registered: 9 years ago Posts: 78 |
Re: Need help with basic ThinkScript June 07, 2015 11:14PM |
Registered: 8 years ago Posts: 59 |
Re: Fun with ThinkScript June 08, 2015 08:14AM |
Registered: 9 years ago Posts: 78 |
Re: Fun with ThinkScript June 09, 2015 07:21AM |
Registered: 9 years ago Posts: 78 |
Re: Fun with ThinkScript June 10, 2015 03:09AM |
Registered: 10 years ago Posts: 615 |
Quote
linter
is there a way to configure it so that i get a blue reading if slowd<20 or if slowd has crossed above 20 in the last two days (or a user set number)?
input last_N_days = 2; def SlowD = StochasticFull(80, 20, 5, 1, HIGH, LOW, close, 3, "SIMPLE" ).FullK; def SlowBelow = SlowD < 20; def SlowCrosses = SlowD crosses above 20; plot scan = SlowBelow or Sum(SlowCrosses, last_N_days) >= 1; AssignBackgroundColor(if scan then Color.BLUE else Color.RED);
Re: Fun with ThinkScript June 10, 2015 03:23AM |
Registered: 10 years ago Posts: 615 |
Quote
Palmer
if you happen to be a CodingGeek or ComputerGeek or some other kind of Geek PM that to me along with your address and I'll cut you a few "_____ Geek" decals and get them to you. If you don't see the correct phrase just send that to me and I'll put that together no problem.
Re: Fun with ThinkScript June 12, 2015 06:21AM |
Registered: 9 years ago Posts: 78 |
Can we make the Script code hidden? June 13, 2015 03:24AM |
Registered: 10 years ago Posts: 75 |
Re: Can we make the Script code hidden? June 13, 2015 05:46PM |
Registered: 10 years ago Posts: 615 |
Quote
optiontrader101
is it possible to make a protection of a special indicator ? So any one can use it but no one can see the code ?
Re: Can we make the Script code hidden? June 14, 2015 04:16AM |
Registered: 10 years ago Posts: 75 |
Re: Fun with ThinkScript June 15, 2015 01:41PM |
Registered: 8 years ago Posts: 26 |
Re: Can we make the Script code hidden? June 16, 2015 07:29PM |
Registered: 8 years ago Posts: 1 |
Fun with ThinkScript June 16, 2015 07:54PM |
Registered: 10 years ago Posts: 615 |
Fun with ThinkScript June 16, 2015 07:56PM |
Registered: 10 years ago Posts: 615 |
Quote
raveon
Robert I was thinking of buying one of the scripts from your Blog but had a question. I can't see any other way to reach you there or here.
I have a similar script you wrote that I downloaded from here that is very good but I'm thinking the one on your Blog most likely has some differences.
How can I get in touch with you?