• 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 pstrusi, Today, 02:05 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by Seastragg, Today, 01:21 PM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by stafe, Today, 01:27 PM
      0 responses
      6 views
      0 likes
      Last Post stafe
      by stafe
       
      Started by Dagamos, Today, 11:48 AM
      3 responses
      14 views
      0 likes
      Last Post NinjaTrader_RyanS  
      Started by kantkant2, Yesterday, 03:20 PM
      4 responses
      26 views
      0 likes
      Last Post eDanny
      by eDanny
       
      Working...
      X