Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Choppy Market Indicator Convert

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Choppy Market Indicator Convert

    Can anyone convert this to NT8 - I think it is thinkscript


    declare lower;
    input line = 20;
    def line_new = line/10;

    def UPa =
    if close[1] > close[2] and close[2] > close[3] and close[3] > close[4] and close[4] > close[5] and close[5] > close[6] then yes else no; #Green

    def UPb =
    if close[1] > close[2] and close[2] > close[3] and close[3] > close[4] then yes else no; #Green Slow

    def UPc =
    if close[2] > close[3] and close[3] > close[4] and close[4] > close[5] and close[5] > close[6] then yes else no; #Green Slower

    def UPd = if close[1] > close[2] and close[3] > close[4] and close[4] > close[5] and close[5] > close[6] then yes else no; #Green Slower

    def UPe = if close[1] > close[2] and close[2] > close[3] and close[4] > close[5] and close[5] > close[6] then yes else no; #Green Slower

    def UPf = if close[1] > close[2] and close[2] > close[3] and close[3] > close[4] and close[5] > close[6] then yes else no; #Green Slower

    def UPg = if close[1] > close[2] and close[2] > close[3] and close[3] > close[4] and close[4] > close[5] then yes else no; #Green Slower


    def DNa = if close[1] < close[2] and close[2] < close[3] and close[3] < close[4] and close[4] < close[5] and close[5] < close[6] then yes else no; #Green

    def DNb =
    if close[1] < close[2] and close[2] < close[3] and close[3] < close[4] then yes else no; #Green Slow

    def DNc =
    if close[2] < close[3] and close[3] < close[4] and close[4] < close[5] and close[5] < close[6] then yes else no; #Green Slower

    def DNd =
    if close[1] < close[2] and close[3] < close[4] and close[4] < close[5] and close[5] < close[6] then yes else no; #Green Slower

    def DNe =
    if close[1] < close[2] and close[2] < close[3] and close[4] < close[5] and close[5] < close[6] then yes else no; #Green Slower

    def DNf =
    if close[1] < close[2] and close[2] < close[3] and close[3] < close[4] and close[5] < close[6] then yes else no; #Green Slower

    def DNg =
    if close[1] < close[2] and close[2] < close[3] and close[3] < close[4] and close[4] < close[5] then yes else no; #Green Slower

    def hist =
    if UPa or DNa then
    10
    else
    if UPb or DNb then
    10
    else
    if UPc or UPd or Upe or UPf or UPg or DNc or DNd or DNe or DNf or DNg then
    10
    else
    0;
    #
    def main = hist[1]+hist[2]+hist[3]+hist[4]+hist[5]+hist[6]+hist[7]+hist[8]+hist[9]+hist[10]/10;
    #
    def mainColor = if(main < main[1]) then
    yes
    else
    no;

    plot Choppy = hist*line_new;
    Choppy.SetPaintingStrategy(PaintingStrategy.HISTOG RAM);
    Choppy.SetLineWeight(2);
    Choppy.AssignValueColor(if UPa or DNa then CreateColor(76, 175, 80) else if UPb or DNb then CreateColor(129, 199, 132) else if UPc or UPd or UPe or UPf or UPg or DNc or DNd or UPe or UPf or UPg then CreateColor(200, 230, 201) else color.white); #ColorGreen, ColorGreenSlow, ColorGreenSlower

    plot TheLine = line;
    TheLine.SetLineWeight(2);
    TheLine.AssignValueColor(color.orange);

    plot TheAverage = main;
    TheAverage.SetLineWeight(2);
    TheAverage.AssignValueColor(if mainColor then color.red else CreateColor(170, 76, 175));

    Thanks

    #2
    Hello DTSSTS,

    Thanks for your post.

    It is against our policy in the Support department to create, modify, convert, or debug code for our clients since we are a small team.

    If you would like to convert this script yourself, I suggest opening the NinjaTrader 8 help guide and the Thinkscript documentation side by side so you could compare the Thinkscript documentation to the methods available in the NinjaTrader help guide.

    Below is a link to a forum post with helpful information about getting started with NinjaScript.
    https://ninjatrader.com/support/foru...040#post786040

    This thread will be open for other community members to share their insight or share their conversion.

    Let me know if I may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Thanks. I really did not expect Support to convert, but thought possible interest by someone in the community to convert. Thanks for leaving open

      Comment


        #4
        Thats some TOS code i see. GO to Fiver for help

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        566 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X