NexusFi: Find Your Edge


Home Menu

 



Categories Help    






Search Results
Searching for entries matching value, looking in title and description, keywords for any words
Found 263 matching entries

Sort by

Entries
Lag Calculation for Octave (MatLab) 1 *
This script is inspired by John Ehlers works on using DSP for trading. His books and articles contain formulas that estimate lag for some indicators. However, how to estimate lag in general case?

This script uses the DFT Phase Response (PhR) to make this estimation. The negative shift in the PhR pushes the values to the right, thus delaying the signal. The raw PhR returns the angle value. However, we want to estimate lag in terms of bars (time delay). To do it, we need to take an account the frequency (or period) of the phase:

Lag = | min(Phase * Period) | = | min(Phase / Frequency) |

Then we need to take the minimal value and take its absolute value. We skip all frequencies above 0.5 (the maximum possible without aliasing).

Version: 0.1.1

Examples:

SMA(3):

>> a = [1];
>> b = [1/3,1/3,1/3];
>> lag(b,a)
ans = 1.0000


EMA(0.1):

>> a = [1,-0.9];
>> b = [0.1];
>> lag(b,a)
ans = 9.0000


Category The Elite Circle 
 
Suggest other entries I might like
Details: Lag Calculation for Octave (MatLab)
Category: The Elite Circle 


June 30th, 2014
Size: 2.17 KB
Downloaded: 1 times
Laguerre ECO 4 *
Richard from MoveTheMarkets wrote this indicator. Visit his blog here:
https://www.movethemarkets.com/blog/2009/09/23/laguerre-eco-ergodic-candle-oscillator-indicator/


Richard
Most indicators out there run on bars. Let’s take a 3-period moving average. You compute it on the Close, the previous Close, and the Close before that. Well, what if you used 3 other values in your average, instead of the last three prices? Like, what if you used the current value of the 2-EMA, 5-EMA, and 8-EMA and computed the average of those instead?

Ehlers uses the 4-RSI as an example application of the Laguerre treatment. Instead of the last 4 Closes, he uses 4 Laguerre values. Using only four values makes the indicator turn quickly, but you can adjust the overall speed of the output via the gamma input to the transform. Pretty neat!

In July, I looked around briefly to see what other Laguerre indicators were out there. Surprisingly, I couldn’t find any. I thought that was strange, because all you have to do is plug in the Laguerre values you need and see what happens. I coded up a few, and found the the Ergodic Candle Oscillator looked pretty good Laguerre-ized.

COMPATIBILITY:
NinjaTrader 6.5: YES
NinjaTrader 7.0: YES (tested by sam028)


Category NinjaTrader 6.5 Indicators  NinjaTrader 7 Indicators 
 
Suggest other entries I might like
Details: Laguerre ECO
Category: NinjaTrader 6.5 Indicators  NinjaTrader 7 Indicators 


September 26th, 2009
Size: 5.89 KB
Downloaded: 1158 times

Keywords: laguerre ehlers eco bmt ninjatrader
Laguerre Filter (amaLaguerreFilter) 5 *
Version 1.0 March 6, 2017

This is a four element Laguerre Filter as described by John Ehlers in his paper "Time Warp - Without Space Travel".

The Laguerre Filter is a smoothing filter based on Laguerre polynomials. Its first term is an EMA, which is then further smoothened with a damping factor. The damping factor may take any value between 0 and 1. When the damping factor is set to 0, the Laguerre Filter becomes a finite impulse response (FIR) filter. When the damping factor is set to a value close to 1, the filter becomes dramatically smoother, but will have a significant lag.

The indicator that can be downloaded here is a four element Laguerre Filter. I have replaced the damping factor with a synthetic lookback period which allows for adjusting smoothness and lag. A lookback period of 1 corresponds to a simple 4-period triangular moving average.

LaguerreFilter(1) = TMA(4)

When the synthetic lookback period is increased, the filter becomes smoother but has a slower response to price changes.


Category NinjaTrader 8 Indicators and More 
 
Suggest other entries I might like
Details: Laguerre Filter (amaLaguerreFilter)
Category: NinjaTrader 8 Indicators and More 


October 20th, 2017
Size: 2.67 KB
Downloaded: 377 times

Keywords: damping filter iir laguerre polynomials
Line Alerts On Price & Indicators V3 5 *
Exported using NT 7.0.1000.25

This indicators allows you to enter user defined values, display them as horizontal lines and trigger alerts within a zone of several ticks or units around these lines.

The package includes two indicators:

- anaLineAlertsOnPrice
- anaLineAlertsOnIndicator.


Line Alerts On Price:

The indicator will automatically show up on the price panel. It can display up to 10 different alert lines. Each of the lines can be activated individually via the indicator dialogue box.

Sound alerts: When sounds are enabled, the indicator will generate sound alerts when one of the lines is approached. Sound files can be selected individually for each of the 10 alert lines.
E-mail alerts: When e-mails are enabled, the indicator will generate e-mail alerts when one of the lines is approached. For the e-mail feature you need to enter the sending and the destination e-mail via indicator dialogue box, and NinjaTrader should be enabled for sending e-mails under Tools -> Options -> Misc
Enabling lines: First enter an alert level and a label, then activate the line. Each line can be activated individually.
Trigger options: Cross_Above, Cross_Below & Cross_Above_Or_Below.
Offset in ticks: Allows to trigger an alert prior to the crossing of the line.
Rearm time: Can be set to avoid permanent triggering of alerts.


Line Alerts On Indicator:

The indicator can be used on other indicators and triggers an alert when the indicator value approaches the alert level. The referenced indicator should be used as the input series, and anaLineAlertsOnIndicator should be applied to the appropriate indicator panel manually.

Sound alerts: When sounds are enabled, the indicator will generate sound alerts when one of the lines is approached. Sound files can be selected individually for each of the 10 alert lines.
E-mail alerts: When e-mails are enabled, the indicator will generate e-mail alerts when one of the lines is approached. For the e-mail feature you need to enter the sending and the destination e-mail via indicator dialogue box, and NinjaTrader should be enabled for sending e-mails under Tools -> Options -> Misc
Enabling lines: First enter an alert level and a label, then activate the line. Each line can be activated individually.
Trigger options: Cross_Above, Cross_Below, Cross_Above_Or_Below, Larger_Than, Smaller_Than. The last two options should be used with histogram indicators such as volume.
Offset value: Allows to trigger an alert prior to the crossing of the line. The offset amount refers to the indicator scale.
Rearm time: Can be set to avoid permanent triggering of alerts.

Update July 28, 2011: Value 0 will be no longer displayed, if no values are entered for the second line. Number of lines reduced to 10. This is no restriction, as the indicator can be applied several times.
Update July 29, 2011: As lots of users tried to apply the lines to other indicators, I have added a version adapted for use with indicators.
Update August 3, 2011: Alert logic modified. Alert will fire when line is touched (offset = 0), or when a value is printed within the alert range (offset > 0).
Update December 7, 2011: A different sound file can now be selected for each of the lines. The user interface is improved.
Update September 20, 2012: For LineAlertsOnPrice option added to differentiate between Cross_Above and Cross_Below, for LineAlertsOnIndicator further option added for histograms, that is Larger_Than or Smaller_Than, new option added for e-mail alerts.
Update March 21, 2014: Small bug removed, indicator occasionally threw exceptions.
Update April 20, 2014: Values for price labels are now correctly display for interest futures in '16 / '32.
Update July 19, 2014: LineAlertsOnIndicator did not display all lines, when some of the alerts were disabled. Bug removed. LineAlertsOnPrice was not affected.


Category NinjaTrader 7 Indicators 
 
Suggest other entries I might like
Details: Line Alerts On Price & Indicators V3
Category: NinjaTrader 7 Indicators 


July 19th, 2014
Size: 14.80 KB
Downloaded: 5952 times

Keywords: alerts horizontal lines resistance support
LineBreakWicked Bar Timer 4 *
06/21/2011: (Ver 1.4) Added the option to show "repeat counter" on main chart beside price in the right margin (optional) and to only have the repeat counter pop up when the value goes over 1. (per request from members).
NOTE: Will look at adding Minute based bars to the counter on next release...

None of the Ninja counters/timers will work with LineBreak or LineBreakWicked bars. For example, Bars.TickCount and Bars.PercentComplete return un-useable values for LineBreakWicked.
The standard Ninja supplied bar timers/bar counters also demand that a bar complete and then move on the next bar when total ticks/volume have been hit, but a LineBreakWicked chart can stay on the same bar for many ticks, until it completes by "breaking" the number of bars parameter.

This indicator works around these problems.
It works with either Tick or Volume based LineBreakWicked bar types.
Configurable.....
- Displays either either the ongoing "count" or the "count remaining" value
- Displays either actual count or the percentage
- Displays a graphics bar that visually shows the fill progress of the bar
Also
- Displays a second count (to the left) of how many times this LineBreakWicked bar has hit it's tick/volume "limit".
(Ex: how many times a 150tick LineBreakWicked actually went through 150 ticks before breaking a level and moving on)

Last but not least....
- The entire Bar Counter can be moved to TopLeft, TopRight, BottomLeft, BottomRight, or Center
- The entire Bar Counter can be 'shifted' up or down by xx pixels.
- Text Font and Plot colors are configurable

Original graphics code is based on the FancyBarTimer (by tobbe...2010)


Category The Elite Circle 
 
Suggest other entries I might like
Details: LineBreakWicked Bar Timer
Category: The Elite Circle 


June 12th, 2011
Size: 5.55 KB
Downloaded: 818 times
Local Order Manager - NinjaTrader Strategy Library 5 *
The [COLOR=#0066cc]Local Order Manager [/COLOR]has been designed to replace the internal NinjaTrader order management functions. It is based upon Unmanaged Order Management function. The goal is to create complex and flexible features that can easily be re-used, freeing the programmer of the strategy to focus upon the intended strategy and not getting bogged down with coding and debugging.

For more information about the NinjaTrader Local Order Manager please refer to the following section:
https://nexusfi.com/wiki/trading-wiki/NT-Local-Order-Manager-LOM-Guide
https://nexusfi.com/elite-automated-ninjatrader-trading/15563-njamc-local-order-manager-lom-collaboration.html

Revision History:

Rev 1:
As issued

Rev 2:
Added: [FONT="]public [/FONT][FONT="]bool[/FONT][FONT="] GoShortLimit([/FONT][FONT="]int[/FONT][FONT="] m_SharesTraded,[/FONT][FONT="]double[/FONT][FONT="] m_Limit,[/FONT][FONT="]int[/FONT] [COLOR=#0066cc]Limit Order[FONT="] m_PositionNumber) - To handle true , Rather than STOPLIMIT[/FONT][/COLOR]
[FONT="]Added: [/FONT][FONT="]public [/FONT][FONT="]bool[/FONT][FONT="] GoShortLimit([/FONT][FONT="]int[/FONT][FONT="] m_SharesTraded,[/FONT][FONT="]int[/FONT][FONT="] m_LimitTicks,[/FONT][FONT="]double[/FONT][FONT="] m_RefPrice,[/FONT][FONT="]int[/FONT] [COLOR=#000080]Limit Order[FONT="] m_PositionNumber) - To handle true , Rather than STOPLIMIT[/FONT][/COLOR]


Added: [FONT="]public [/FONT][FONT="]bool[/FONT][FONT="] GoLongLimit([/FONT][FONT="]int[/FONT][FONT="] m_SharesTraded,[/FONT][FONT="]double[/FONT][FONT="] m_Limit,[/FONT][FONT="]int[/FONT][FONT="] m_PositionNumber) - To handle true Limit Order, Rather than STOPLIMIT[/FONT]
[FONT="]Added: [/FONT][FONT="]public [/FONT][FONT="]bool[/FONT][FONT="] GoLongLimit([/FONT][FONT="]int[/FONT][FONT="] m_SharesTraded,[/FONT][FONT="]int[/FONT][FONT="] m_LimitTicks,[/FONT][FONT="]double[/FONT][FONT="] m_RefPrice,[/FONT][FONT="]int[/FONT][FONT="] m_PositionNumber) - To handle true Limit Order, Rather than STOPLIMIT[/FONT]

Rev 3:
Added: [FONT="]public [/FONT][FONT="]void[/FONT][FONT="] SetStatsBoxVisable([/FONT][FONT="]bool[/FONT][FONT="] m_Stats)[/FONT]
Added: [FONT="]GoShortStopLimit() Functions, depreciated functions that are misleading[/FONT]
Added: [FONT="]GoLongStopLimit() Functions, depreciated functions that are misleading[/FONT]

Rev 4: 4/1/2012
Added: Various Trailing Stop fixes
Fix: [FONT="]PartialFills improvements[/FONT]
Experimental: Timer functions for future features

Rev 5: 4/15/2012
Fix: [FONT="]Major Stability Improvements, Partial Fills almost flawless[/FONT]
Experimental: Timer functions for future features improved

Rev 6: 7/25/2012 (Beta Release)
Fix: Major Stability Improvements, Partial Fills almost flawless
Fix: Timer functions for Good Until, detects fast replay and autodisables
Added: Good Until by Time & #Bars
Added: Trailing Stop DataSeries Driven
Added: GoLimitBracket
Added: GetFillQuantity
Added: Rejected Order handling (started)
Improved: Entry/exit functions added object to contain rules/handling
Experimental: Timer functions for future features improved
Added: Version ID Current LOM:02b.01b.01a.01.01b.02.01.01a.01.0.0.2

Rev 7: 9/26/2013 (Beta Release)
Update done by contributor, not fully integrated but available.
Fix: Fixed a bug in dataseries based SetTrailingStop() in which the the wrong variable is used for calculating the tick offset.
Changed: Changed the behavior of the dataseries based SetTrailingStop() such that it will remain triggered after the price has moved beyond the trail trigger ticks and retrace back. The previous implementation is such that the trailing stop will be active only when the price remains beyond the trail trigger ticks.
Improved: Commented out the warning logs for non-value dataseries of the indicator based Trailing Stop. It is not necessary for trailing stop indicator to return a value for every bar. For example, a price action swing trailing stop indicator returns an update of a stop loss value after it makes a swing. Furthermore, it is more efficient to update the stop loss value as and when it is required.

Rev 8: 11/24/2014
Update done by contributor, not fully integrated but available.
General: Rolled up many improvements into the latest build
Added: Added new user contribution "SetStatsBoxVisable(bool m_Stats, string m_DebugString)" to enable and disable Stats box with Debugging String
Added: Version ID Current LOM:02b.01b.01b.01.01b.02a.01.01b.01.0.0.2


Category The Elite Circle 
 
Suggest other entries I might like
Details: Local Order Manager - NinjaTrader Strategy Library
Category: The Elite Circle 


December 5th, 2014
Size: 40.29 KB
Downloaded: 1604 times
MACD Colored Candles on Crossover 4 *
Atttached file uses the parameters 6-16-6 EMA vs the code parameters below.

# Waylock on [email protected]
# created 11/5/12

input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input AverageType = {SMA, default EMA};

def Value = MACD(fastLength, slowLength, MACDLength, AverageType).Value;
def Avg = MACD(fastLength, slowLength, MACDLength, AverageType).Avg;

# Changes color of bars
AssignPriceColor(if Value > Avg then Color.LIME else if Value < Avg then
color.MAGENTA else color.current);


Category ThinkOrSwim 
 
Suggest other entries I might like
Details: MACD Colored Candles on Crossover
Category: ThinkOrSwim 


November 5th, 2012
Size: 471 bytes
Downloaded: 219 times

Keywords: candles macd colored
MACD Dots on Crossover 5 *
# Waylock - 11/5/12 - [email protected]

# MACD Dots on Price Chart
# Shows Primary Signals only. Once a BuyAlert is issued another BuyAlert cannot be issued until after a SellAlert has been issued, etc.
# Change Displace value below to adjust where Dots are placed on the Price Chart

input displace = .001;

input fastLength = 6;
input slowLength = 16;
input MACDLength = 6;
input AverageType = {SMA, default EMA};

def Value = MACD(fastLength, slowLength, MACDLength, AverageType).Value;
def Avg = MACD(fastLength, slowLength, MACDLength, AverageType).Avg;

def BuyAlert = Value > Avg;
def SellAlert = Value <= Avg;

rec count=if BuyAlert==1 and count[1]==0 then 1 else if SellAlert==0 and count[1]>=1 then count[1]+1 else 0;

rec count1=if SellAlert==1 and count1[1]==0 then 1 else if BuyAlert==0 and count1[1]>=1 then count1[1]+1 else 0;

def PrimaryBuyAlert = BuyAlert==1 and count==1;
def PrimarySellAlert = SellAlert==1 and count1==1;

plot DotUp = if PrimaryBuyAlert then Low * (1 - displace) else double.nan;
DotUp.SetPaintingStrategy(PaintingStrategy.POINTS);
DotUp.SetDefaultColor(Color.BLUE);
DotUp.SetLineWeight(5);
DotUp.HideBubble();
DotUp.HideTitle();

plot DotDn = if PrimarySellAlert then High * (1 + displace) else double.nan;
DotDn.SetPaintingStrategy(PaintingStrategy.POINTS);
DotDn.SetDefaultColor(Color.YELLOW);
DotDn.SetLineWeight(5);
DotDn.HideBubble();
DotDn.HideTitle();


Category ThinkOrSwim 
 
Suggest other entries I might like
Details: MACD Dots on Crossover
Category: ThinkOrSwim 


November 5th, 2012
Size: 1.38 KB
Downloaded: 314 times
MACDBBLines (amaMACDBBLines) 5 *
Version 1.3 October 30, 2018

The MACDBBLines indicator is built from a standard MACD indicator with Bollinger Bands added to the signal line. The MACD values are shown as dots. This indicator is typically used to generate with-trend entries when the upper or lower Bollinger Band is violated.

Minor trend: The minorlower timeframe trend is up when the MACD is rising. It is down when the MACD is falling.

Major trend: The higher timeframe trend may be taken from the MACD itself. An major uptrend is signaled when MACD > 0, while MACD < 0 stands for a major downtrend.

Public Properties: The indicator comes with a few public Series<double> that can be accessed via other indicators or automated strategies. These will also be shown in the strategy builder. The series "Trend" may be used to detect the minor trend. "Trend" will show the value +2 when the MACD is rising and above the upper Bollinger Band, +1 when it is rising and below the upper Bollinger Band, -1 when it is falling and above the lower Bollinger Band, -2 when it is falling and below the lower Bollinger Band. You will further find two Series<double> "LongSignal" and "ShortSignal". "LongSignal" will return +2 for an upper band violation in a major uptrend (strong signal), +1 for an upper band violation in a major downtrend (weak signal) and 0 for no signal. Accordingly, "ShortSignal" will return +2 for a lower band violation in a major downtrend (strong signal), +1 for an lower band violation in a major uptrend (weak signal) and 0 for no signal.

Market Analyzer Column: The indicator comes with two separate market analyzer columns. The first column will simply indicate the trend and return values based on rising and falling MACD above or below the Bollinger Bands as described above. The second column will return entry signals, where +2 stand for a strong long signal, + 1 for a weak long signal, 0, for no signal, -1 for a weak short signal and - 2 for a strong short signal. For the market analyzer I have squeezed long and short signals into a single column, as there is little space on a market analyzer. For the Series<double> objects, I have separated the LongSignal and ShortSignal series, as they are designed to return positive values or 0 for no signal only. Please pay attention to the difference.

Paint Bars: The indicator comes with paint bars that reflect the minor trend. The colors are similar to the colors for the MACDBB dots, but you may differentiate between upcloses and downcloses.

Sound Alerts: The indicator comes with sound alerts that will be triggered when the upper or lower band is violated, or when the major trend changes.


Category NinjaTrader 8 Indicators and More 
 
Suggest other entries I might like
Details: MACDBBLines (amaMACDBBLines)
Category: NinjaTrader 8 Indicators and More 


October 31st, 2018
Size: 14.91 KB
Downloaded: 2133 times

Keywords: bollinger macd macdbb macdbblines oscillator
MacdBBV4 + Gapless + TickSize 5 *
There has been a request for an NT7 version of my NT8 MacdBB indicator here:

https://nexusfi.com/local_links.php?action=ratelink&catid=27&linkid=1693

This version comes 'as is'

What you will get:

* Same features as Fat Tails' original MacdBB indicator.
* Gapless feature that ignores the session open gap.
* TickSize addition to help 'normalize' the macd value.
* Band region filled to the same color as the Bollinger plots.

What will not work:

* Dots plotted on price panel. Keep value 'false'. This is due to the 'filled bands', as NT will not allow plotting on both panels.
* My gradient version is not available.


Category NinjaTrader 7 Indicators 
 
Suggest other entries I might like
Details: MacdBBV4 + Gapless + TickSize
Category: NinjaTrader 7 Indicators 


December 19th, 2015
Size: 12.23 KB
Downloaded: 1223 times
 



 
Category
 




© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top