NexusFi: Find Your Edge


Home Menu

 





Collection of "ana"-Indicators for NinjaTrader


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 53 posts (428 thanks)
    2. looks_two Big Mike with 8 posts (25 thanks)
    3. looks_3 podski with 5 posts (4 thanks)
    4. looks_4 SK4949 with 4 posts (1 thanks)
      Best Posters
    1. looks_one Fat Tails with 8.1 thanks per post
    2. looks_two Silvester17 with 6 thanks per post
    3. looks_3 Big Mike with 3.1 thanks per post
    4. looks_4 podski with 0.8 thanks per post
    1. trending_up 77,663 views
    2. thumb_up 476 thanks given
    3. group 106 followers
    1. forum 109 posts
    2. attach_file 37 attachments




 
Search this Thread

Collection of "ana"-Indicators for NinjaTrader

  #11 (permalink)
 
podski's Avatar
 podski 
Belgium
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader Brokerage, CQG
Trading: FDAX, FDXM ...maybe
Posts: 388 since Sep 2012
Thanks Given: 499
Thanks Received: 470


Fat Tails View Post
I have published a few indicators in August, which have a considerable value adn that have so far been underestimated. I therefore use this thread to discuss the issue.

There are a few statistical crimes that are repeatedly committed when indicators are used for trading purposes.


[B]Crime No. 1: .....

Is it a statistical crime to enquire about gapless versions of these indicators. Am I cursing in the church ?

For intraday trading gapless indicators are good as they are up to speed at the open.

Nothing immediate but you might want to consider a "Gapless=True" type switch depending on how people are using them.

p

Visit my NexusFi Trade Journal Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #12 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


podski View Post
Is it a statistical crime to enquire about gapless versions of these indicators. Am I cursing in the church ?

For intraday trading gapless indicators are good as they are up to speed at the open.

Nothing immediate but you might want to consider a "Gapless=True" type switch depending on how people are using them.

p

I am not fond of gapless indicators. I think that there scope of application is pretty limited. If you look at FOREX, crude oil, gold and other commodities, why would you consider to eliminate part of the price data and declare it void? To me this looks like a strategy of a US born ostrich, which put its head down in the sand while Asian and European traders are continuing there battle over prices. The world is less and less dependant on the US economy, trading volumes will gradually decline during the US session and increase ofr the Asian and European session.

The only instruments where gaps are still valid are those that have strong regional background and which are not linked to the global economy. To a limited extent this is true for index and treasury futures.


But let us look at the mechanics of a gapless oscillator versus an oscillator that resets at the beginning of the regular session. For that purpose let us consider the following scenario:

Yesterday ES has been closing near its daily low. The oscillator has moved far into negative territory. During the night session prices have first retraced, then tested the low and moved up above yesterday's midline. The sentiment has now changed.

Gapless indicator: The gapless indicator continues its journey where it stopped at the session close the prior day. The negative values are carried over into the new trading day. Thus the indicator will produce negative values during the beginning of the new session.

Resetting indicator: The oscillator is reset to zero at the beginning of the session. Today's values are only calculated from the data of today's regular session.

I have often used resetting indicators, such as the VWAP or a SMA calculated from the NYSE Tick. Both reset at the beginning of the session and their values do not depend on yesterday's price action. However the gapless indicator carries its burden from yesterday. I really don't want to see that burden on my regular session chart, as it has been neutralized or at least changed by the price action that has taken place during the night session.

In our scenario described above, the resetting indicator would show a gap: it would gap up from the oversold territory and restart at zero. The gapless indicator would show a smooth transition, but it lies about the markets!

Started this thread Reply With Quote
Thanked by:
  #13 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


A linear regression indicator and its average

The indicator called trigger lines is an extremely simple indicator. The lead line is a linear regression indicator - it plots the end point of a linear regression line calculated from the last N data points. The signal line is an exponential moving average of the lead line. Both lines can be directly built with NinjaTrader default indicators, as you can use the LinReg indicator as an input series for the EMA to generate the signal line.

The trigger lines indicator has been made popular by the NEXGEN T-3 system, but you will find it in many other trading systems. A single LinReg(34) line can be used as a trendfilter on any chart. The trend is up, when price is above the LinReg(34), the trend is down, when it is below.


Coloring the space between two plots

The interesting problem here is to color the space between the two plots depending on whether the lead line is above or below the signal line. This is not as easy as someone might think. There are a few points to consider:

- DrawRegion() which is used to color the space between the plots, can slow down NinjaTrader. It is therefore necessary to avoid cutting the filled area into many little spaces, but let DrawRegion() cover an entire segment.

- When the indicator is set to COBC = false, preliminary signals which are not confirmed with the bar close, need to be removed.

- When the indicator is displaced, the colored space between the indicators also needs to be moved back or forth accordingly.


Exposing the trend as a BoolSeries

The indicator also exposes the trend as a BoolSeries, which can be directly accessed from a (manually coded) strategy. If you wish to access the trend via the Market Analyzer or the Strategy Builder, you would need to replace the BoolSeries with a transparent plot instead.

Here is the link to the indicator. I have made the last update 2 days ago, as the old indicator did not well respond to a negative shift.





Started this thread Reply With Quote
Thanked by:
  #14 (permalink)
 
podski's Avatar
 podski 
Belgium
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader Brokerage, CQG
Trading: FDAX, FDXM ...maybe
Posts: 388 since Sep 2012
Thanks Given: 499
Thanks Received: 470


Fat Tails View Post
I am not fond of gapless indicators. ...

The only instruments where gaps are still valid are those that have strong regional background and which are not linked to the global economy. To a limited extent this is true for index and treasury futures.

The gapless indicator would show a smooth transition, but it lies about the markets!

Indeed I use the anaMovingMedianVWTPO as a sort of trend filter on a sleepy backwater instrument that is of little consequence globally. It doesn't even trade 24/7 and misses 80% of the Asian trading session. The DAX.

It's from a head in the sand place called ... (let me look ... ) oh yeah. Germany.



This is the gap from this morning. As you can see in this chart I have combined it with a VWAP.

I like the idea of the MovingMedianVWTPO.

The thing about a gap, on index futures like the DAX is that it occurs with no volume.

regards

p

Attached Thumbnails
Click image for larger version

Name:	VWTPO.png
Views:	481
Size:	60.6 KB
ID:	125041  
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #15 (permalink)
 
podski's Avatar
 podski 
Belgium
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader Brokerage, CQG
Trading: FDAX, FDXM ...maybe
Posts: 388 since Sep 2012
Thanks Given: 499
Thanks Received: 470


Fat Tails View Post
A linear regression indicator and its average


The trigger lines indicator has been made popular by the NEXGEN T-3 system, but you will find it in many other trading systems. A single LinReg(34) line can be used as a trendfilter on any chart. The trend is up, when price is above the LinReg(34), the trend is down, when it is below.

Call me a sucker for punishment ...

This is a lovely indicator. Like many MACross indies it is deceptively pretty in hindsight.

The LinReg trend filter is nice too .. but as a trend filter, I think it needs to be gapless. I will try to get one.



Depending on what you are trading and when you are trading it the statistical accuracy of any indie is important but it may not be everything!!!

I do like the idea of being able to anchor them to different time points.

Lets take the DAX for example. It trades completely differently in the morning than in the afternoon. When the river DAX meets the river ES the waters are muddy.

I like to sometimes anchor indicators to different time points so that I can see what the traders who joined in in the afternoon are seeing and indeed what they are feeling.

Sometimes you care not about the deep down meaning of an indicator.

A VWAP for the afternoon session on the DAX is not "the VWAP" it is however the volume weighted average price ... since the boys across the pond got up !

regards

p

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #16 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


podski View Post
Indeed I use the anaMovingMedianVWTPO as a sort of trend filter on a sleepy backwater instrument that is of little consequence globally. It doesn't even trade 24/7 and misses 80% of the Asian trading session. The DAX.

It's from a head in the sand place called ... (let me look ... ) oh yeah. Germany.



This is the gap from this morning. As you can see in this chart I have combined it with a VWAP.

I like the idea of the MovingMedianVWTPO.

The thing about a gap, on index futures like the DAX is that it occurs with no volume.

regards

p


I am not against correcting for the gap. But then you should use a resetting indicator (like the VWAP) and not a gapless indicator.

Started this thread Reply With Quote
Thanked by:
  #17 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


podski View Post
Call me a sucker for punishment ...

No need, you will be punished by the markets.


podski View Post
Lets take the DAX for example. It trades completely differently in the morning than in the afternoon. When the river DAX meets the river ES the waters are muddy.

A VWAP for the afternoon session on the DAX is not "the VWAP" it is however the volume weighted average price ... since the boys across the pond got up !

I agree. The FDAX has two separate sessions within the same trading day. In the morning it follows European news at its own pace. In the afternoon - that is after 1:00 PM CET - it is driven by expectations or news coming from overseas. In the afternoon there is no reason to trade the FDAX, as you can directly trade US index futures which should have a higher volatility.

Started this thread Reply With Quote
Thanked by:
  #18 (permalink)
 
aligator's Avatar
 aligator 
Las Vegas, NV
Legendary Market Wizard
 
Experience: Advanced
Platform: Abacus, Slide Rule, HP-65
Trading: Futures, Stocks, Options
Posts: 3,620 since Aug 2010
Thanks Given: 1,071
Thanks Received: 5,992


Fat Tails View Post



- When the indicator is set to COBC = false, preliminary signals which are not confirmed with the bar close, need to be removed.

@Fat Tails,

This may not be the right place for this question but generically speaking, how is this accomplished for any signal generating indicator? Can you share the approach or generic part of the code to remove non-confirmed signals on bar close with COBC = false?

Thanks.

Visit my NexusFi Trade Journal Reply With Quote
  #19 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


aligator View Post
@Fat Tails,

This may not be the right place for this question but generically speaking, how is this accomplished for any signal generating indicator? Can you share the approach or generic part of the code to remove non-confirmed signals on bar close with COBC = false?

Thanks.

When an indicator is set to COBC = false, all plots are typically recalculated with every incoming tick. Because plots are reset to the correct value, they do not need to be removed.

However, if you have a preliminary signal that generates a draw object such as an arrow, you need to check with every incoming tick, whether the signal is still valid. In case that a new tick invalidates the preliminary signal, you need to remove the draw object. This is achieved with the NinjaScript command RemoveDrawObject("tag"), where the tag is the label that was chosen for the draw object that you wish to remove.

Started this thread Reply With Quote
Thanked by:
  #20 (permalink)
 
srgtroy's Avatar
 srgtroy 
Los Angeles, California Republic
Legendary  R.I.P. 1965-2023 
 
Experience: None
Platform: Sierra Chart
Broker: CQG
Trading: ES
Posts: 1,928 since Jan 2011
Thanks Given: 1,375
Thanks Received: 3,722


I think session based versions of the Moving Statistics indicators (reset at beginning of session, no lookback) would be very interesting.

R.I.P. Roy Goldberg (srgtroy), 1965-2023.
Please visit [url="https://nexusfi.com/off-topic/60226-srgtroy-r-i-p-brotha.html[/url] for more information.
Reply With Quote
Thanked by:




Last Updated on March 28, 2020


© 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
no new posts