Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

The TMV

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

    The TMV

    I would like to have the TMV on ninjatrader. I first learned about it on tos. I have found that it works very well on trending days and even on the chops. Basically it could tell you when its time to exit a trade, but only with the actual SPX, not the ES, and not so much when to enter on the chop. I don't know if this is the correct forum or if I am allowed to post the code, but here it is

    input price = close;
    input keltnerLength = 13;
    input volumeFastLength = 1;
    input volumeSlowLength = 20;
    input ADXLength = 10;
    input SMALength = 8;
    input volumeOscThreshold = 0.5;
    input paintBars = yes;

    def keltnerSMA = Average(hlc3, keltnerLength);
    def avgRange = Average(high - low, keltnerLength);
    def volumeOsc = reference VolumeOsc("fast length" = volumeFastLength, "slow length" = volumeSlowLength, "diff type" = "percent");
    def ADX = reference ADX(ADXLength, AverageType.WILDERS);
    def SMA = Average(price, SMALength);

    plot KeltnerHigh = keltnerSMA + avgRange;
    plot KeltnerMid = keltnerSMA;
    plot KeltnerLow = keltnerSMA - avgRange;
    plot VolumeSpike = volumeOsc > volumeOscThreshold;

    KeltnerHigh.SetDefaultColor(GetColor(4));
    KeltnerMid.SetDefaultColor(GetColor(4));
    KeltnerMid.SetStyle(Curve.LONG_DASH);
    KeltnerLow.SetDefaultColor(GetColor(4));
    VolumeSpike.SetDefaultColor(GetColor(1));
    VolumeSpike.SetLineWeight(3);
    VolumeSpike.SetPaintingStrategy(PaintingStrategy.B OOLEAN_POINTS);

    DefineGlobalColor("Up", Color.UPTICK);
    DefineGlobalColor("Neutral", Color.GRAY);
    DefineGlobalColor("Down", Color.DOWNTICK);
    AssignPriceColor( if !paintBars
    then Color.CURRENT
    else if ADX > ADX[1] and price > SMA
    then globalColor("Up")
    else if ADX > ADX[1] and price < SMA
    then globalColor("Down")
    else globalColor("Neutral"));

    #2
    Originally posted by marketvoyager View Post
    I would like to have the TMV on ninjatrader. I first learned about it on tos. I have found that it works very well on trending days and even on the chops. Basically it could tell you when its time to exit a trade, but only with the actual SPX, not the ES, and not so much when to enter on the chop. I don't know if this is the correct forum or if I am allowed to post the code, but here it is

    input price = close;
    input keltnerLength = 13;
    input volumeFastLength = 1;
    input volumeSlowLength = 20;
    input ADXLength = 10;
    input SMALength = 8;
    input volumeOscThreshold = 0.5;
    input paintBars = yes;

    def keltnerSMA = Average(hlc3, keltnerLength);
    def avgRange = Average(high - low, keltnerLength);
    def volumeOsc = reference VolumeOsc("fast length" = volumeFastLength, "slow length" = volumeSlowLength, "diff type" = "percent");
    def ADX = reference ADX(ADXLength, AverageType.WILDERS);
    def SMA = Average(price, SMALength);

    plot KeltnerHigh = keltnerSMA + avgRange;
    plot KeltnerMid = keltnerSMA;
    plot KeltnerLow = keltnerSMA - avgRange;
    plot VolumeSpike = volumeOsc > volumeOscThreshold;

    KeltnerHigh.SetDefaultColor(GetColor(4));
    KeltnerMid.SetDefaultColor(GetColor(4));
    KeltnerMid.SetStyle(Curve.LONG_DASH);
    KeltnerLow.SetDefaultColor(GetColor(4));
    VolumeSpike.SetDefaultColor(GetColor(1));
    VolumeSpike.SetLineWeight(3);
    VolumeSpike.SetPaintingStrategy(PaintingStrategy.B OOLEAN_POINTS);

    DefineGlobalColor("Up", Color.UPTICK);
    DefineGlobalColor("Neutral", Color.GRAY);
    DefineGlobalColor("Down", Color.DOWNTICK);
    AssignPriceColor( if !paintBars
    then Color.CURRENT
    else if ADX > ADX[1] and price > SMA
    then globalColor("Up")
    else if ADX > ADX[1] and price < SMA
    then globalColor("Down")
    else globalColor("Neutral"));

    Is this not it? here?

    Comment


      #3
      Hello marketvoyager,

      You can find the direct link to the TMV below.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      650 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      370 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      574 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      577 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X