• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
      Patrick H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by brunoviveiros, Today, 09:36 AM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by GARZONJ, Today, 11:22 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by KonalGondal, Today, 10:18 AM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by Jorge.andres.o, Today, 09:24 AM
      4 responses
      21 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by Oracletrades, Today, 09:02 AM
      5 responses
      22 views
      0 likes
      Last Post Oracletrades  
      Working...
      X