Can someone please convert this indicator from tradingview to nt8 - futures io
futures io



Can someone please convert this indicator from tradingview to nt8


Discussion in NinjaTrader

Updated
    1. trending_up 572 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 2 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 150,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Can someone please convert this indicator from tradingview to nt8

(login for full post details)
  #1 (permalink)
 Dinoraver 
Chicago Illinois
 
Experience: None
Platform: Ninjatrader
Trading: NQ futures
 
Posts: 2 since Mar 2022
Thanks: 0 given, 0 received

Hello,

I have a chandelier exit that I love using as part of a strategy for tradingview. It plots slightly different on the tradingview indicator versus any of the nt8 versions I have found so if anyone could direct me where I could go to get the code translated I would greatly appreciate it.

Thank You

study("Chandelier Exit", shorttitle="CE", overlay=true)

length = input(title="ATR Period", type=input.integer, defval=22)
mult = input(title="ATR Multiplier", type=input.float, step=0.1, defval=3.0)
showLabels = input(title="Show Buy/Sell Labels ?", type=input.bool, defval=true)
useClose = input(title="Use Close Price for Extremums ?", type=input.bool, defval=true)
highlightState = input(title="Highlight State ?", type=input.bool, defval=true)

atr = mult * atr(length)

longStop = (useClose ? highest(close, length) : highest(length)) - atr
longStopPrev = nz(longStop[1], longStop)
longStop := close[1] > longStopPrev ? max(longStop, longStopPrev) : longStop

shortStop = (useClose ? lowest(close, length) : lowest(length)) + atr
shortStopPrev = nz(shortStop[1], shortStop)
shortStop := close[1] < shortStopPrev ? min(shortStop, shortStopPrev) : shortStop

var int dir = 1
dir := close > shortStopPrev ? 1 : close < longStopPrev ? -1 : dir

var color longColor = color.green
var color shortColor = color.red

longStopPlot = plot(dir == 1 ? longStop : na, title="Long Stop", style=plot.style_linebr, linewidth=2, color=longColor)
buySignal = dir == 1 and dir[1] == -1
plotshape(buySignal ? longStop : na, title="Long Stop Start", location=location.absolute, style=shape.circle, size=size.tiny, color=longColor, transp=0)
plotshape(buySignal and showLabels ? longStop : na, title="Buy Label", text="Buy", location=location.absolute, style=shape.labelup, size=size.tiny, color=longColor, textcolor=color.white, transp=0)

shortStopPlot = plot(dir == 1 ? na : shortStop, title="Short Stop", style=plot.style_linebr, linewidth=2, color=shortColor)
sellSignal = dir == -1 and dir[1] == 1
plotshape(sellSignal ? shortStop : na, title="Short Stop Start", location=location.absolute, style=shape.circle, size=size.tiny, color=shortColor, transp=0)
plotshape(sellSignal and showLabels ? shortStop : na, title="Sell Label", text="Sell", location=location.absolute, style=shape.labeldown, size=size.tiny, color=shortColor, textcolor=color.white, transp=0)

midPricePlot = plot(ohlc4, title="", style=plot.style_circles, linewidth=0, display=display.none, editable=false)

longFillColor = highlightState ? (dir == 1 ? longColor : na) : na
shortFillColor = highlightState ? (dir == -1 ? shortColor : na) : na
fill(midPricePlot, longStopPlot, title="Long State Filling", color=longFillColor)
fill(midPricePlot, shortStopPlot, title="Short State Filling", color=shortFillColor)

changeCond = dir != dir[1]
alertcondition(changeCond, title="Alert: CE Direction Change", message="Chandelier Exit has changed direction!")
alertcondition(buySignal, title="Alert: CE Buy", message="Chandelier Exit Buy!")
alertcondition(sellSignal, title="Alert: CE Sell", message="Chandelier Exit Sell!")

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
Tips for directional bias during Asian Session?
Traders Hideout
value chart indicator by sim22
NinjaTrader
mahDualCandlePattern
NinjaTrader
need help with easy language OR breakout code:)
Traders Hideout
Economic news events - Plotted on chart
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Spoo-nalysis ES e-mini futures S&P 500
58 thanks
How many day traders are profitable?
49 thanks
how many hours per day do you watch the market?
15 thanks
Why you should move from futures to forex
15 thanks
Attached Orders
13 thanks
 
(login for full post details)
  #2 (permalink)
 Fat Tails 
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,870 since Mar 2010
Thanks: 4,238 given, 26,873 received

The Chandelier Stop can be calculated in different ways:

- Donchian anchor (highest high since N bars) versus highest high since in position
- Calculation from highest high / lowest low (standard) versus calculation from highest close / lowest close
- Calculation as trailing stop (no widening of stop allowed when volatility increases) versus stop that may widen
- Design to revert intra-bar when touched (such as a hard stop) or to revert based on the close

Best you post a simple 5-min or 15-min chart of ES 06-22 or NQ 06-22 with the Chandelier Stop applied.

That way it is possible to find out which version you are looking for.

Reply With Quote
 
(login for full post details)
  #3 (permalink)
 Anagami 
Legendary Market Hustler
Panama City, Panama
 
Experience: Advanced
Trading: MES
 
Anagami's Avatar
 
Posts: 954 since Dec 2010
Thanks: 679 given, 2,210 received



Fat Tails View Post
The Chandelier Stop can be calculated in different ways:

- Donchian anchor (highest high since N bars) versus highest high since in position
- Calculation from highest high / lowest low (standard) versus calculation from highest close / lowest close
- Calculation as trailing stop (no widening of stop allowed when volatility increases) versus stop that may widen
- Design to revert intra-bar when touched (such as a hard stop) or to revert based on the close

Best you post a simple 5-min or 15-min chart of ES 06-22 or NQ 06-22 with the Chandelier Stop applied.

That way it is possible to find out which version you are looking for.

WHAT?? Harry is ALIVE?

You are never in the wrong place... but sometimes you are in the right place looking at things in the wrong way.
Reply With Quote
The following user says Thank You to Anagami for this post:


futures io Trading Community Platforms and Indicators NinjaTrader > Can someone please convert this indicator from tradingview to nt8


Last Updated on May 16, 2022


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2022 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
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.
no new posts