January 17th, 2011
Size: 2.54 KB
Downloaded: 261 times
797
redratsal
The download link was broken. I re-uploaded the installer file on March 14, 2016.
"The Donchian Channel indicator is an indicator that was created by Richard Donchian. The Donchian Channel indicator that was created by Richard Donchian is an indicator that uses the highest high and the lowest low of the price of a stock over a period of days to indicate the plot of a channel of the highest high and the lowest low of the price of a stock over a period of days."
To clarify that, "이 리차드 Donchian 만든 표시했다 Donchian 채널 표시. 이 지표가 가장 높은의 채널의 음부과 최저의 낮은 말을 일 기간 동안 가장 높고 주식의 저렴한 가격의 최저를 사용하는지 리처드 Donchian에 의해 생성 된 Donchian 채널 표시 일 기간 동안 주식의 가격".
This plots identically to the Ninjatrader version while using a fraction of the CPU resources. With COBC false, that would be more like a TINY fraction. (Even less than the fraction of truthful content in my newspapers. Or the signal to noise ratio of the indicator description, which has been rephrased as Gibberish and translated into two different languages.)
The MIN and MAX algorithms have been moved into the indicator and are called only when needed. Optimizing external classes is good, but eliminating the need for them is even better.
OnBarUpdate is not called for redundant intrabar ticks that would not affect the output.
If you want to use this to replace the Ninjatrader Donchian System Indicator you would have to rename this one and put it in a folder with the @prefix after deleting the original one. If you are not comfortable doing that, please don't.
This has a different name than the system indicator, so can be installed in the usual way using the Import Ninjascript utility.
Your satisfaction is important to me, so please report any problems.
January 3rd, 2013
Size: 2.54 KB
Downloaded: 348 times
1339
Zondor
Version: 20150901
Improvements comparing to out-of-box BB and KC indicators:
1) It is rewritten based on underlying functions, so that when you need to write strategy, you can call the function directly.
2) it gives you choice of moving average type. I only enable EMA and SMA, but you can add more with simple coding.
3) the mid line can be in two colors when it is up/down from last bar.
September 1st, 2015
Size: 4.37 KB
Downloaded: 434 times
1647
gztanwei
Attached is a paintbar indi for TradeStation to show Inside
and Outside bars - or rather TS' Engulfing and Harami bars.
The attached picture has inside bars light green & bright red,
outside bars dark green & red. It is just an example - not all
reversals are signaled as well as that !
As in the code, to specify a color, one then prepends
color.
to the color's name :
InDnColor(color.Red)
for instance.
If you're happy with TradeStation's range of colors, you can
remove every instance of
color.
The (amateur) code :
{ Candlestick PaintBar }
inputs: Length( 14) ,
InUpColor(color.Chartreuse) , InDnColor(color.Red) ,
OutUpColor(color.DarkGreen) , OutDnColor(color.FireBrick) ,
NmlUpColor(color.LightSeaGreen), NmlDnColor(color.LightSalmon) ,
variables: oBullishEngulfing( 0 ) , oBearishEngulfing( 0 ) , oBullishHarami(0) , oBearishHarami(0), barColor(blue) ;
Value1 = C_BullEng_BearEng( Length, oBullishEngulfing, oBearishEngulfing ) ;
Value2 = C_BullHar_BearHar( Length, oBullishHarami, oBearishHarami ) ;
if oBullishEngulfing = 1 then barColor = OutUpColor
else if oBullishHarami = 1 then barColor = InUpColor
else if oBearishEngulfing = 1 then barColor = OutDnColor
else if oBearishHarami = 1 then barColor = InDnColor
else if Close > Open then barColor = NmlUpColor
else if Close < Open then barColor = NmlDnColor ;
PlotPaintBar( High, Low, "InsOuts", barColor ) ;
"Index" is a multi-purpose multi-instrument indicator. It can be use to plot a 2 (or more) instrument spread, a total portfolio value, a 2 (or more) instrument pair or basket trade price, a multi-instrument index of your own creation, or even to calculate a major index (mainly useful for demonstration purposes). It works with "CalculateOnBarClose" set to either false (real-time) or true (for lower CPU overhead).
Parameters are:
1) SymbolList: a comma-delimited list of symbols
2) WeightList: a comma-delimited list of weights (1 per symbol; or a single weight (default: 1) for all symbols)
3) Divisor: A number (default: 1) divided into the sum of (symbols x weights)
4) NoOutputWhenMissingInput: (default: false) if true, plot will be blank for any bars which have a missing input; if false, the last known good output will be repeated.
5) OldestDataMinutes: Input is considered missing if older than this many minutes. If set to 0 (default) Input is considered missing if older than 1 bar. In no event will it use data from a prior day (if the symbol hasn't opened yet today, it is considered missing).
The ""Input Series" for the indicator is NOT used in the calculation; it is the "clock" that drives the output, and must be time-based (i.e. minute, day, etc. bars). The Input Series should be an active instrument (no missing bars). If you want to plot this indicator on a non-time-based chart (i.e. volume bars), you need to add a time-based data series to the chart, and select that as the "Input Series" to the indicator. This indicator may be used as input to another indicator, but if so you must press "F5" after adding it to the chart due to NT7 issues. Exported using NT version 7.0.1000.3
Usage Examples:
(1) Plot a pair trade spread: Long 3 INTC, Short 7 AMD
SymbolList: INTC,AMD
WeightList: 3,-7
Divisor: 1
(2) Plot the spread between two futures months:
SymbolList: ES 06-11,ES 09-11
WeightList: 1,-1
Divisor: 1
(3) Plot the value of a portfolio: 100 SBUX, 300 ACN, 100 AAPL, 200 CAT, 400 T, 100 GLD
SymbolList: SBUX,ACN,AAPL,CAT,T,GLD
WeightList: 100,300,100,200,400,100
Divisor: 1
Reproducing a major index is not especially useful because index quotes and history are easily available from data providers.
The following examples show how they are created, so you can create your own index that has meaning to you.
(4) Plot the Dow Jones Industrial Average (a price-weighted index)
SymbolList: MMM,AA,AXP,T,BAC,BA,CAT,CVX,CSCO,KO,DD,XOM,GE,HPQ,HD,INTC,IBM,JNJ,JPM,KFT,MCD,MRK,MSFT,PFE,PG,TRV,UTX,VZ,WMT,DIS
WeightList: 1 (DJIA is price weighted, all components have equal weight)
Divisor: 0.132129493 (the Dow Divisor as of 7/2/10, see https://www.cmegroup.com/trading/equity-index/files/djia-history-divisor.pdf)
(5) Plot SOX (a market-cap weighted index, weights are shares outstanding on 2/20/11, shares and divisor are from from https://indexes.nasdaqomx.com)
SymbolList: ALTR,AMAT,AMD,ATHR,AVGO,BRCM,CREE, CRUS,HITT,INTC,KLAC,LLTC,LRCX, MKSI,MRVL,MU,NETL,NSM,NVDA, NVLS,POWI,RBCN,SNDK,STM,TER, TSM,TXN,VECO,WFR,XLNX
WeightList: 364951315,2060521585,1396802719,146660859,490415275, 575686296,196473483,141628229, 63130703,1212702808,342283544, 392826431,251960161,103124900,
1105594919,1763931357,130849166, 490825711,941628062,184777433, 57263098,46993684,287133221, 153857427,371654361,1191268991, 805417714,81755766,465958033, 472202863
Divisor: 822180367
The indicator displays the current open, the initial balance (IB) and upper and lower range bands that are calculated by adding and subtracting fractions of the initial balance to the IB high and IB low.
You can only use this indicator with an appropriate session template. The opening time will align itself to the start time of the RTH session, as specified via session template. The hybrid setting assumes that you want to use the 3rd intraday session as RTH session for FOREX and currency futures and the second session for all other instruments.
Example ES: Select a session template with the following sessions: Session 1 (night session) 15:30 - 8:30 Central Time, Session 2 (RTH) 8:30 - 15:15 Central Time. Select second session for opening range.
Select length of opening period: The length of the opening range can be selected via indicator dialogue box The default setting is 60 minutes.
Select Offset: With an offset of 00:00, the indicator aligns to the start of the selected session. If you enter a positive value for the offset, the opening range will be shifted forward from the session start. For example if you open a chart for ES with the session template US CME Index Futures, then the session (and the trading day) starts at 5:00 PM Central Time. To display an opening range for the regular session, you need to enter an offset of 15:30, because the regular session starts 15 hours and 30 minutes after the start of the trading day.
Multipliers for range bands: The multipliers for the upper and lower range bands can also be changed. The default settings for the bands are 0.5, 1 and 2, meaning that the first upper band is built from the IB high by adding half of the IB range, and similar for the other bands.
Developing range: Prior to the completion of the initial balance, the indicator plots the developing range in gray to show that the range is still incomplete.
Night session or pre-session range: The indicator also has an option to display the full night session, European or Asian session range. This feature is not used with the default settings. I did not add it on purpose, it was already part of the opening range indicator, and it was easier to leave it than to remove it.
European Session Range: You can select start and end time of the European Session in CET (Central European Time). The European Session is pre-configured for the time between 8:00 AM and 1:00 PM CET.
Asian Session Range: You can select start and end time of the Asian Session in TST (Tokyo Standard Time). The Asian Session is pre-configured for the time between 9:00 AM and 3:00 PM TST.
Update June 2, 2011: New signature for GetNextBeginEnd() implemented.
Update June 11, 2011: Small bug removed, indicator did not display opening range and pre-session range correctly during the training period (first bars of the chart, after scrolling to the left horizontally).
Update June 21, 2011: The indicator now works with half-pip FOREX feeds. Indicator dialogue box improved.
Update July 25, 2011: Serialization of the plots and indicator dialogue box changed.
Update January 24, 2012: Offset added, opening period no longer needs to be aligned to session start.
Update February 19, 2012: Option added to cut off the opening range at the next session break.
Update October 6, 2013: Minor bug removed, offset was not applied correctly on tick charts, when indicator was set to COBC = false.
Update October 24, 2013: Drop down property added for European and Asian Time Zone
Update December 8, 2013: Indicator partly recoded and custom plot added.
Indicator will only run on NT 7.0.1000.5 or later.
The indicator displays the current open, the initial balance (IB) and upper and lower range bands that are calculated by adding and subtracting fractions of the initial balance to the IB high and IB low. This version is a multi-timeframe (MTF) version of the standard Initial Balance Range Bands V42 indicator. The indicator adds a second minute bar series to the chart, which is used to calculate the initial balance. It has the following advantages over the standard version:
For tick, range and volume charts: The standard indicator may not display the initial balance correctly, if the last bar expands the initial balance and closes after the opening period. The MTF version of the indicator will display the initial balance correctly, even if the primary bar series does not contain the necessary information for its calculation. An example is shown on the chart attached.
Use with minute charts: You want to use this indicator with minute charts, if the opening period is not an integer multiple of the bar period. Example: You trade 7 min charts and your opening period is 30 minutes.
You can only use this indicator with an appropriate session template. The opening time will align itself to the start time of the RTH session, as specified via session template. The hybrid setting assumes that you want to use the 3rd intraday session as RTH session for FOREX and currency futures and the second session for all other instruments.
Example ES: Select a session template with the following sessions: Session 1 (night session) 15:30 - 8:30 Central Time, Session 2 (RTH) 8:30 - 15:15 Central Time. Select second session for opening range.
Select length of opening period: The length of the period for establishing the initial balance can be selected via indicator dialogue box. The default setting is 60 minutes.
Select Offset: With an offset of 00:00, the indicator aligns to the start of the selected session. If you enter a positive value for the offset, the opening range will be shifted forward from the session start. For example if you open a chart for ES with the session template US CME Index Futures, then the session (and the trading day) starts at 5:00 PM Central Time. To display an opening range for the regular session, you need to enter an offset of 15:30, because the regular session starts 15 hours and 30 minutes after the start of the trading day.
Multipliers for range bands: The multipliers for the upper and lower range bands can also be changed. The default settings for the bands are 0.5, 1 and 2, meaning that the first upper band is built from the IB high by adding half of the IB range, and similar for the other bands.
Display regular open or one-minute-range: The indicator allows to either display the regular open or the range of the first minute of trading after the start time selected for the opening range.
Developing range: Prior to the completion of the opening range, the indicator plots the developing range in gray to show that the range is still incomplete.
Night session or pre-session range: The indicator also has an option to display the full night session, European or Asian session range. This feature is not used with the default settings. I did not add it on purpose, it was already part of the opening range indicator, and it was easier to leave it than to remove it.
European Session Range: You can select start and end time of the European Session in CET (Central European Time). The European Session is pre-configured for the time between 8:00 AM and 1:00 PM CET.
Asian Session Range: You can select start and end time of the Asian Session in TST (Tokyo Standard Time). The Asian Session is pre-configured for the time between 9:00 AM and 3:00 PM TST.
Update July 25, 2011: Serialization of the plots and indicator dialogue box changed.
Update December 8, 2013: Indicator entirely recoded. Offset added, opening period no longer needs to be aligned to the session start. Drop down property added for time zones. Custom plot added.
Update March 15, 2015: Regular open and minute range were drawn back to start of trading day on tick charts. Bug removed.
September 14th, 2018 09:29 PM BKOp One more request for an NT8 version. I haven't found another indicator that can handle the oil crack spread 3 instrument
s with multiplication, and have moved from NT7 to NT8.
June 19th, 2017 03:54 PM jmont1 Great indi !!! Any chance U R doing an NT8 ? I have tried converting it without success.
December 4th, 2012 03:53 PM dilbert618 Great idea, Thank you
October 5th, 2011 01:12 PM MWinfrey Cool indicator...now I don't have to write one myself.
August 4th, 2011 04:51 AM Sim22 Thank you could be useful