NexusFi: Find Your Edge


Home Menu

 





convert to nt8


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 planetmoto 
freasno, ca usa
 
Experience: Advanced
Platform: ninja trader
Trading: forex
Posts: 105 since Apr 2013
Thanks Given: 52
Thanks Received: 85

input showBands = yes;
input source = close;
input lookback = 60;
input multi = 0.2;

def na = Double.NaN;
def exitLength = RoundUp(lookback / 4, 0);

Script ma {
input src = close;
input len = 15;
def sqLen = Round(sqrt(len), 0);
def wma1 = wma(src, len);
def wma2 = wma(src, len / 2);
def ma = wma(2 * wma2 - wma1, sqLen);
plot out = ma;
}
def tr = TrueRange(high, close, low);
def BBMC = ma(source, lookback);
def rangema = ExpAverage(tr, lookback);
def upperk =BBMC + rangema * multi;
def lowerk = BBMC - rangema * multi;
def col = if source > upperk then 1 else if source < lowerk then -1 else 0;

def ExitHigh = ma(high, exitLength);
def ExitLow = ma(low, exitLength);
def Hlv3 = if source > ExitHigh then 1 else if source < ExitLow then -1 else Hlv3[1];
def sslExit = if Hlv3 < 0 then ExitHigh else ExitLow;
def base_cross_Long = (close > sslExit) and (close[1] <= sslExit[1]);
def base_cross_Short = (sslExit > close) and (sslExit[1] <= close[1]);
def codiff = if base_cross_Long then 1 else if base_cross_Short then -1 else 0;

plot ExitArrowUp = if codiff>0 then low else na;
plot ExitArrowDn = if codiff<0 then low else na;
plot maTrendLine = BBMC; # 'MA Trendline'
plot limitUp = if showBands then upperk else na;
plot limitDn = if showBands then lowerk else na;

maTrendLine.SetLineWeight(2);
maTrendLine.AssignValueColor(if col>0 then Color.CYAN else if col<0 then Color.MAGENTA else Color.GRAY);
limitUp.AssignValueColor(if col>0 then Color.CYAN else if col<0 then Color.MAGENTA else Color.GRAY);
limitDn.AssignValueColor(if col>0 then Color.CYAN else if col<0 then Color.MAGENTA else Color.GRAY);
ExitArrowUp.SetDefaultColor(Color.CYAN);
ExitArrowDn.SetDefaultColor(Color.MAGENTA);
ExitArrowUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
ExitArrowDn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
  #2 (permalink)
 noushina 
lansing, michigan
 
Experience: Intermediate
Platform: MT5, NT8
Broker: AMP, CQG
Trading: MES, MYM, MNQ, M2K
Posts: 17 since Oct 2018
Thanks Given: 40
Thanks Received: 29

Have ChatGPT help you with it. I use a subscription for $20/month. Say "This is an indicator I want converted to NT8." You might want to tell it what it is supposed to do. Also GPT tends to not put in enough libraries and so things don't work. I usually copy all the libraries from a working indicator over to the one GPT is making.

Sometimes you just have to give up. BUt it has done a lot of indicators and mods of indicators for me. It converted an NT7 to NT8 without a problem (except not enough libraries added).

Reply With Quote
Thanked by:
  #3 (permalink)
 puapwr 
Honolulu, HI
 
Experience: Intermediate
Platform: NT, TV, QT
Broker: AMP
Trading: Futures
Posts: 10 since Nov 2022
Thanks Given: 7
Thanks Received: 4


Aloha!

At your convenience would it be possible to convert this NT7 round numbers indicator to NT8?

Many thanks!

Attached Files
Elite Membership required to download: RoundNumbers.zip
Reply With Quote




Last Updated on December 28, 2024


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