NexusFi: Find Your Edge


Home Menu

 





Conversion of TradingView indicator into NT8


Discussion in NinjaTrader

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




 
 

Conversion of TradingView indicator into NT8

 
 Abusamjad91 
San Francisco California
 
Experience: None
Platform: NinjaTrader
Trading: futures
Posts: 70 since Oct 2020
Thanks Given: 56
Thanks Received: 59

Hello FIO,

Can someone convert this TradingView indicator into NT8?

//@version=3
study("Blended Candles")
theEMA = input(50)
theEMA2 = input(200)
lb = input(3,title = "Lookback")
out = ema(close, theEMA)
out2 = ema(close, theEMA2)
hc = highest(high,lb + 1)
oc = open[lb]
cc = close
lc = lowest(low,lb + 1)

plot(out, color=red,linewidth=2,transp=30)
plot(out2, color=green,linewidth=2,transp=30)
plotcandle(oc, hc, lc, cc, color = oc < cc ? green : red , wickcolor = white , bordercolor = white)

Attached Thumbnails
Click image for larger version

Name:	blended.png
Views:	107
Size:	51.2 KB
ID:	328090  
Started this thread

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Futures True Range Report
The Elite Circle
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
 
 
 
Tasker_182's Avatar
 Tasker_182 
Cedar Rapids, iowa
Legendary Market Wizard
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader - Continuum
Posts: 716 since Aug 2009
Thanks Given: 476
Thanks Received: 1,401


Abusamjad91 View Post
Hello FIO,

Can someone convert this TradingView indicator into NT8?

//@version=3
study("Blended Candles")
theEMA = input(50)
theEMA2 = input(200)
lb = input(3,title = "Lookback")
out = ema(close, theEMA)
out2 = ema(close, theEMA2)
hc = highest(high,lb + 1)
oc = open[lb]
cc = close
lc = lowest(low,lb + 1)

plot(out, color=red,linewidth=2,transp=30)
plot(out2, color=green,linewidth=2,transp=30)
plotcandle(oc, hc, lc, cc, color = oc < cc ? green : red , wickcolor = white , bordercolor = white)


I'm not familiar with TradingView code so I took a stab at this. As near as i can tell the indicator does not use the values of either of the EMAs in the bar calculations so I left those off. You can easily add EMAs to the chart in NinjaTrader.

In calculating the candles I'm understanding (I think) that:
1) Close of the candle is the real close of the source candle so no changes there.
2) The Open of the candle is from the Candle from the lookback period (default is 3 so for discussion we can assume we use the Open price of the 3rd candle back, whatever it may be)
3) The High is determined as the maximum high value over the lookback period plus 1
4) The Low is determined as the minimum low value of the lookback period plus 1.

Those 4 values then are used to create and color each candle.

To be clear these candle representations DO NOT correctly show actual price.

I've attached a screenshot that shows the indicator applied with default values to a ES 1 minute bar series, below that is a copy of the original 1 minute bars which clearly show no relationship. The screenshot also shows the two EMAs manually added.

I hope this is what you need.




Screenshot_20221117_040813

Be yourself; everyone else is already taken. Oscar Wilde
Attached Files
Elite Membership required to download: BlendedCandles.cs
Thanked by:
 
 Abusamjad91 
San Francisco California
 
Experience: None
Platform: NinjaTrader
Trading: futures
Posts: 70 since Oct 2020
Thanks Given: 56
Thanks Received: 59


Thank you @ Tasker_182. Your work is much appreciated! This is what I was looking for.

Started this thread
Thanked by:

 



Last Updated on November 17, 2022


© 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