NexusFi: Find Your Edge


Home Menu

 





help with NT8 indicator for UniRenko


Discussion in NinjaTrader

Updated
    1. trending_up 1,708 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 8 posts
    2. attach_file 6 attachments




 
Search this Thread
  #1 (permalink)
 vickisb 
Sarasota FL
 
Experience: Intermediate
Platform: Ninja Trader
Trading: ES
Posts: 83 since Feb 2017
Thanks Given: 45
Thanks Received: 27

Can anyone help with an indicator (attached) I have written?

It's meant for UniRenko bar type, where tick trend is entered as a parameter, and it will then print (on the bar) the number of ticks the most recently closed bar has advanced past the most recent reversal bar. It The results I see in the current and recent time frame are correct, but further back historically it doesn't print.

Not asking anyone to debug, but is there anything obvious?


Attached Files
Elite Membership required to download: TicksPastTurnbarConfigurable.cs
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Iran Ceasefire Surges to 19.5% on US 15-Point Plan -- 82 …
Prediction Markets & Event Contracts
El Clasico Draws $9.2M in Prediction Market Action -- Bi …
Prediction Markets & Event Contracts
TradingView Opens Volume Footprint Data to Pine Script - …
TradingView
Cboe Files for Near 24x5 Equities Trading -- December 20 …
Traders Hideout
Kraken Becomes First US Digital Asset Bank With Direct F …
Cryptocurrency
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
22 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
5 thanks
  #2 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 Vendor: www.innovative-trading-solutions-online.com 
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: ES
Posts: 687 since Jun 2009
Thanks Given: 765
Thanks Received: 789


vickisb View Post
Can anyone help with an indicator (attached) I have written?

It's meant for UniRenko bar type, where tick trend is entered as a parameter, and it will then print (on the bar) the number of ticks the most recently closed bar has advanced past the most recent reversal bar. It The results I see in the current and recent time frame are correct, but further back historically it doesn't print.

Not asking anyone to debug, but is there anything obvious?

See what happens if you comment out the following code.


if (_ticks == 0)
{
}

else


Reply With Quote
Thanked by:
  #3 (permalink)
 vickisb 
Sarasota FL
 
Experience: Intermediate
Platform: Ninja Trader
Trading: ES
Posts: 83 since Feb 2017
Thanks Given: 45
Thanks Received: 27



RJay View Post
See what happens if you comment out the following code.


if (_ticks == 0)
{
}

else

No change...


Started this thread Reply With Quote
  #4 (permalink)
 vickisb 
Sarasota FL
 
Experience: Intermediate
Platform: Ninja Trader
Trading: ES
Posts: 83 since Feb 2017
Thanks Given: 45
Thanks Received: 27


vickisb View Post
Can anyone help with an indicator (attached) I have written?

It's meant for UniRenko bar type, where tick trend is entered as a parameter, and it will then print (on the bar) the number of ticks the most recently closed bar has advanced past the most recent reversal bar. It The results I see in the current and recent time frame are correct, but further back historically it doesn't print.

Not asking anyone to debug, but is there anything obvious?

I figured it out. Corrected indicator attached, in case you want to compare or just use the indicator. I was resetting the "_tag" at the beginning of session, so on prior days, there were dups that didn't get printed. Now I'm just starting and 1 and incrementing for the entire chart.


Attached Files
Elite Membership required to download: TicksPastTurnbarConfigurable.cs
Started this thread Reply With Quote
  #5 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: NQ / ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,801 since Aug 2009
Thanks Given: 11,742
Thanks Received: 3,018


vickisb View Post
I figured it out. Corrected indicator attached, in case you want to compare or just use the indicator. I was resetting the "_tag" at the beginning of session, so on prior days, there were dups that didn't get printed. Now I'm just starting and 1 and incrementing for the entire chart.

Can you explain what it does / value?


Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on X Reply With Quote
  #6 (permalink)
 vickisb 
Sarasota FL
 
Experience: Intermediate
Platform: Ninja Trader
Trading: ES
Posts: 83 since Feb 2017
Thanks Given: 45
Thanks Received: 27


DavidHP View Post
Can you explain what it does / value?

It's meant for UniRenko bar type. If you enter the data series' tick trend as the tick trend parameter of the indicator, the indicator will then print (on the bar) the number of ticks the most recently closed bar has advanced past the close of the most recent reversal bar.

I typically use the close of a reversal bar as my entry point, if other entry criteria are met. I look back historically and use the tick count from this indicator to assess how many ticks I can realistically expect for my take profit level, adjusting for slippage. So in situations where I'm often seeing values like 14, 18, 24, etc printed before a reversal bar in the opposite direction, I would know visually without replay testing that it doesn't make sense to even consider setting my take profit to 28 ticks, for instance.

In the attached image's run to the upside, it wouldn't make sense to set my target to 36 ticks, if this image's run is typical, with one run of 58 but the others falling short of the 36t target with only 26, 34, and 24 ticks before reversing (reversal ticks set to 16) and triggering my stop.



It might not be helpful at all or make sense to you, but it is just a visual tool to help me assess the likely number of ticks in a run. Most other tick counter indicators, like Price Action Swing Pro, include the number of ticks in the reversal bar that started the new trend and therefore weren't exactly what I wanted.


Started this thread Reply With Quote
  #7 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: NQ / ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,801 since Aug 2009
Thanks Given: 11,742
Thanks Received: 3,018


vickisb View Post
It might not be helpful at all or make sense to you, but it is just a visual tool to help me assess the likely number of ticks in a run. Most other tick counter indicators, like Price Action Swing Pro, include the number of ticks in the reversal bar that started the new trend and therefore weren't exactly what I wanted.

I'm not criticizing the indicator.
I noticed the numbers shown change with the Tick Trend change on the indicator.
Seems they are not actually measuring number of ticks the same.

(i.e the leg that shows 108- 414 on the left image and 72-276 on the right image is actually 119.5 ticks from top to bottom of leg on both.)

Is there a setting that should be used other than the series TickTrend?

Both images are of the same DataSeries and only change is the TickTrend setting in the indicator.


Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on X Reply With Quote
  #8 (permalink)
 vickisb 
Sarasota FL
 
Experience: Intermediate
Platform: Ninja Trader
Trading: ES
Posts: 83 since Feb 2017
Thanks Given: 45
Thanks Received: 27


DavidHP View Post
I'm not criticizing the indicator.
I noticed the numbers shown change with the Tick Trend change on the indicator.
Seems they are not actually measuring number of ticks the same.

(i.e the leg that shows 108- 414 on the left image and 72-276 on the right image is actually 119.5 ticks from top to bottom of leg on both.)

Is there a setting that should be used other than the series TickTrend?

Both images are of the same DataSeries and only change is the TickTrend setting in the indicator.

The indicator's TickTrend parameter MUST MATCH the Tick Trend of the Data Series for the calculation to be correct. (There may be a way to have the indicator figure that out automatically, but I don't know how.) And the indicator is not measuring from the extreme top to bottom of the run or vice versa. It is only measuring from the close of the reversal bar that started the leg (which is the soonest I would be triggered to enter a trade) to the close of the last bar of the run before the reversal bar that ends the run.

See the image. It's measuring from the CLOSE of the bar that started the run (NOT the high) to the CLOSE of the bar before the next reversal bar (NOT the low of the next reversal bar). It sets a bar counter to 0 when there's a reversal bar, then just increments for every new close in that direction and simply multiplies that bar count by the tick trend.

It may be easier to see on the short run that is labeled '18'. There were two complete bars after the reversal bar to the upside closed. Two bars x tick trend of 9 = 18.

Also, for the sake of eliminating clutter, it doesn't print anything until the close of the 2nd bar.


Started this thread Reply With Quote
  #9 (permalink)
 vickisb 
Sarasota FL
 
Experience: Intermediate
Platform: Ninja Trader
Trading: ES
Posts: 83 since Feb 2017
Thanks Given: 45
Thanks Received: 27

As mentioned above, I have fixed the bug I was asking for help with. I have also found a way to have the code detect the Tick Trend of the data series automatically so it a) doesn't have to be input as a parameter and b) will always be correct. And I've just generally cleaned up the code a bit.

I've attached the indicator again, with all the changes. I hope someone else finds it helpful, too


Attached Files
Elite Membership required to download: TicksPastTurnbarConfigurable.cs
Started this thread Reply With Quote




Last Updated on July 22, 2024


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