Re: Fun with ThinkScript September 19, 2014 09:47PM |
Registered: 9 years ago Posts: 9 |
Re: Fun with ThinkScript September 19, 2014 09:51PM |
Registered: 9 years ago Posts: 15 |
Re: Fun with ThinkScript September 20, 2014 10:58AM |
Registered: 9 years ago Posts: 15 |
Re: Fun with ThinkScript September 20, 2014 05:56PM |
Registered: 10 years ago Posts: 465 |
Re: Fun with ThinkScript September 28, 2014 07:03PM |
Registered: 9 years ago Posts: 1 |
Re: Fun with ThinkScript October 02, 2014 03:26PM |
Registered: 9 years ago Posts: 1 |
# Custom_TrendHunter by ncastrinos # Verison 1.0 11/10/2011 @ 0800 HRS # Place study in lower pane declare lower; #User inputs: input length = 20; input trendabove = 7.5; input trendbelow = -7.5; #Aggregate data for a linear regression over the length above rec Regression = Inertia(close,length); #Determine the angle of the lower end of the line and plot it in an oscillator plot Data = Atan((Regression-Regression[(length-1)])/(length-1))* 180 / Double.Pi; #Plot your indicator lines plot above = trendabove; plot below = trendbelow;
Re: Fun with ThinkScript October 06, 2014 07:22PM |
Registered: 10 years ago Posts: 615 |
Quote
Mel
Hi All,
I'm trying to write a script that draws a vertical line showing a daily moving average cross on an intraday chart. It seems to work except it shows multiple lines depending on the intraday time frame. For example, on a 1 hour chart it will show 10 lines. Is there any way to show just one line at either the EOD or BOD. This code was taken from one of Robert's scripts and modified.
Thx
Mel
# Draw vertical line to indicate call and put signals AddVerticalLine(Condition4 && !Condition4[1] && show_vertical_line, "UP", Color.UPTICK); AddVerticalLine(Condition3 && !Condition3[1] && show_vertical_line, "DOWN", Color.LIGHT_RED);
Re: Fun with ThinkScript October 07, 2014 09:49PM |
Registered: 9 years ago Posts: 6 |
Re: Fun with ThinkScript October 07, 2014 11:21PM |
Registered: 10 years ago Posts: 615 |
Quote
mklatx
Anyone know how one can have lines pertaining to a gap of varying size or percent keep extending out on the chart indefinitely until they are crossed? ive got a couple different gap scripts but none are percent, either they extend even when crossed or they don't extend past the day. thx.
Re: Fun with ThinkScript October 08, 2014 01:20AM |
Registered: 9 years ago Posts: 34 |
Re: Fun with ThinkScript October 08, 2014 01:00PM |
Registered: 10 years ago Posts: 615 |
Quote
strategynode
I am using multiple diffrent signals on a 5 min chart. They all have up or down signal (Arrow) is there a way to stack the arrows one below the other if there are multiple signals on one bar?
Or is there a solution which you guys use to see all the signals? may be dots? if so can you let me know how ?
Thanks,
StrategyNode
def ma1 = Average(close, 5); def ma2 = Average(close, 10); def ma3 = Average(close, 20); def cross1 = ma1 crosses above ma2; def cross2 = ma1 crosses above ma3; plot x1 = cross1; x1.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP); x1.SetLineWeight(1); x1.SetDefaultColor(color.blue); plot x2 = cross2; x2.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP); x2.SetLineWeight(5); x2.SetDefaultColor(Color.GREEN);
def ma1 = Average(close, 5); def ma2 = Average(close, 10); def ma3 = Average(close, 20); def DotOffset = AvgTrueRange(high(period = "day" ), low(period = "day" ), close(period = "day" ), 14) * 0.03; def cross1 = ma1 crosses above ma2; def cross2 = ma1 crosses above ma3; def cross3 = cross1 and cross2; plot x1 = if cross1 then low - DotOffset else Double.NaN; x1.SetPaintingStrategy(PaintingStrategy.POINTS); x1.SetLineWeight(3); x1.SetDefaultColor(Color.BLUE); plot x2 = if cross2 then low - 2 * DotOffset else Double.NaN; x2.SetPaintingStrategy(PaintingStrategy.POINTS); x2.SetLineWeight(3); x2.SetDefaultColor(Color.GREEN); plot x3 = if cross3 then low - 3 * DotOffset else Double.NaN; x3.SetPaintingStrategy(PaintingStrategy.POINTS); x3.SetLineWeight(3); x3.SetDefaultColor(Color.PLUM);
Re: Fun with ThinkScript October 08, 2014 01:45PM |
Registered: 9 years ago Posts: 34 |
Re: Fun with ThinkScript October 08, 2014 01:50PM |
Registered: 10 years ago Posts: 615 |
Re: Fun with ThinkScript October 08, 2014 11:49PM |
Registered: 9 years ago Posts: 34 |
Re: Fun with ThinkScript October 09, 2014 12:22AM |
Registered: 9 years ago Posts: 34 |
Re: Fun with ThinkScript October 09, 2014 06:49AM |
Registered: 10 years ago Posts: 615 |
Quote
strategynode
I have a new question. I have couple of studies I use, there anyway to create a ONE alert when diffrent studies are meeting the criteria at the same time.
I know I can combine studies in one signal but that becomes to selective so say if i am using the MACD Histogram and a buy signal, I want the alert to fire when the MACD bar < one bar ago but also if there is a buy signal exists during that time.
I am not sure if I am making my self clear enough.
StrategyNode
def MACDsignal = blah blah blah; def BUYsignal = blah blah blah; plot ALERTsignal = (MACDsignal or MACDsignal[1]) and BUYsignal;
Re: Fun with ThinkScript October 09, 2014 08:35AM |
Registered: 9 years ago Posts: 34 |
Re: Fun with ThinkScript October 09, 2014 09:52AM |
Registered: 9 years ago Posts: 34 |
Re: Fun with ThinkScript October 09, 2014 10:35AM |
Registered: 10 years ago Posts: 615 |
Quote
strategynode
I had a weird problem this morning with the points the earlier signals were are all arrows up or down and they worked in pre market can anybody think of any reason why the POINTS didn't work in premarket?
Quote
I was wondering if the problem above has anything to do with the following code
def DotOffset = AvgTrueRange(high(period = "day" ), low(period = "day" ), close(period = "day" ), 14) * 0.03;
I am using this in a 5 min chart so should I change "day" to 5 min ?
Re: Fun with ThinkScript October 10, 2014 08:51AM |
Registered: 9 years ago Posts: 6 |
Re: Fun with ThinkScript October 15, 2014 06:20AM |
Registered: 9 years ago Posts: 2 |
Re: Fun with ThinkScript October 15, 2014 10:37AM |
Registered: 9 years ago Posts: 34 |
input vsl = 12; input vfl = 26; input vlb = 21; input vma = 9; def vmacBI = ((((mACDHistogram(vsl,vfl,vma)[1] < maCDHistogram(vsl,vfl,vma)[2]) * (macdhistogram(vsl,vfl,vma)[1] < macdhistogram(vsl,vfl,vma))) * (MACDHistogram(vsl,vfl,vma)[1] > LOWESt(MACDHistogram(vsl,vfl,vma),vlb))) * (LOW[1] < LOWESt(LOW,vlb)[2])); def vmacSS = ((((mACDHistogram(vsl,vfl,vma)[1] > maCDHistogram(vsl,vfl,vma)[2]) * (macdhistogram(vsl,vfl,vma)[1] > macdhistogram(vsl,vfl,vma))) * (MACDHistogram(vsl,vfl,vma)[1] < HIGHESt(MACDHistogram(vsl,vfl,vma),vlb))) * (HIGH[1] > HIGHEst(HIGH,vlb)[2])); def vmachBI = ((((mACDHistogram(vsl,vfl,vma)[1] < maCDHistogram(vsl,vfl,vma)[2]) * (macdhistogram(vsl,vfl,vma)[1] < macdhistogram(vsl,vfl,vma))) * (MACDHistogram(vsl,vfl,vma)[1] < LOWESt(MACDHistogram(vsl,vfl,vma),vlb)[2])) * (LOW[1] > LOWESt(LOW,vlb)[2])); def vmachSS = ((((mACDHistogram(vsl,vfl,vma)[1] > maCDHistogram(vsl,vfl,vma)[2]) * (macdhistogram(vsl,vfl,vma)[1] > macdhistogram(vsl,vfl,vma))) * (MACDHistogram(vsl,vfl,vma)[1] > HIGHESt(MACDHistogram(vsl,vfl,vma),vlb)[2])) * (HIGH[1] < HIGHEst(HIGH,vlb)[2])); def DotOffset = AvgTrueRange(high(period = "day" ), low(period = "day" ), close(period = "day" ), 14) * 0.03; plot DiBI = if vmacBI[-1] then low - 4*DotOffset else Double.NaN; plot DiSS = if vmacSS[-1] then high - -7*DotOffset else Double.NaN; plot DihiBI = if vmachBI[-1]then low - 5*DotOffset else Double.NaN; plot DihiSS = if vmachSS[-1] then high - -8*DotOffset else Double.NaN; DiBI.setPaintingStrategy(paintingStrategy.POINTS); DiBI.SetDefaultColor(Color.bLUE); Diss.setPaintingStrategy(paintingStrategy.POINTS); Diss.SetDefaultColor(Color.bLUE); DihiBI.setPaintingStrategy(paintingStrategy.POINTS); DihiBI.SetDefaultColor(Color.cyan); Dihiss.setPaintingStrategy(paintingStrategy.POINTS); Dihiss.SetDefaultColor(Color.cyan); Alert(DIbi, "Divergence" + getsymbol(), Alert.bar, Sound.ring); Alert(DIss, "Divergence" + getsymbol(), Alert.bar, Sound.bell); Alert(DIhiBI, "Divergence" + getsymbol(), Alert.bar, Sound.ring);
def a = mACDHistogram(12,26,9)[1]; def b = maCDHistogram(12,26,9)[2]; def c = LOWESt(MACDHistogram(12,26,9),21); def d = MACDHistogram(); def VMACBI = (((a < b) * (a < d))* (a > c))* (LOW[1] < LOWESt(LOW,21)[2]); Plot buy = VmacBI from 0 bar ago;
Re: Fun with ThinkScript November 01, 2014 01:51PM |
Registered: 9 years ago Posts: 9 |
Re: Fun with ThinkScript November 14, 2014 08:43PM |
Registered: 9 years ago Posts: 2 |
Re: Fun with ThinkScript November 16, 2014 02:39PM |
Registered: 9 years ago Posts: 1 |
ZigZag Net Volume November 23, 2014 04:26PM |
Registered: 9 years ago Posts: 1 |
Quote
Definition of Net Volume
Investopedia.com DEFINITION of 'Net Volume'
A term in technical analysis that represents a security's uptick volume minus its downtick volume over a specified period. The net volume of a stock is a consolidated total of the positive and negative movements of the security over the period. A stock that is said to have had a positive net volume over a given period will have seen greater upward movement in its price than downward.
InvestorWords.com DEFINITION of 'Net Volume'
Uptick volume minus downtick volume for a given security or exchange over a given period of time.
Re: Fun with ThinkScript December 02, 2014 04:43AM |
Registered: 9 years ago Posts: 3 |
Re: Fun with ThinkScript December 02, 2014 01:17PM |
Registered: 9 years ago Posts: 1 |
Re: Fun with ThinkScript December 02, 2014 04:44PM |
Registered: 9 years ago Posts: 4 |
Re: Fun with ThinkScript December 02, 2014 04:52PM |
Registered: 9 years ago Posts: 4 |