Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Delta Divergence Indicator

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

    Delta Divergence Indicator

    Hello,

    Below is the code for a Delta Divergence indicator I found on the Tradovate community indicators. Can someone translate this to an indicator for NT8? Much appreciation and thanks in advance.

    Description
    Delta is a key concept to understand when making trading decisions based upon traded volume.
    It’s the difference between the volume of market orders buying by lifting the offer price and the volume of market orders selling by hitting the bid price.
    In other words, if Delta is greater than zero, we had more buying than selling and if Delta is less than zero, we had more selling than buying.

    Delta gives us a broad sense for each bar of whether we have more aggressive buying or selling.
    We can compare Delta between bars to get a sense of whether supply and demand are rising or falling,
    Delta Divergence tells us when the delta across price bars is not moving in the same direction as price.

    Example:
    1. Bearish Divergence ==> Price has made a new high but there was more selling than buying.
    2. Bullish Divergence ==> Price has made a new low but there was more buying than selling.

    Plots
    Red dot above the high when price makes higher high on negative delta
    Green dot below the low when price makes lower low on positive delta

    */


    const predef = require("./tools/predef");
    const meta = require("./tools/meta");

    class deltaDivergence {
    map(d, i, history) {
    let bearishDivergence;
    let bullishDivergence;
    const tickSize = this.contractInfo.tickSize;
    if(i > 0){
    const deltaValue = d.offerVolume() - d.bidVolume();
    const currentHigh = d.high();
    const currentLow = d.low();
    const prevDeltaValue = history.prior().offerVolume() - history.prior().bidVolume();
    const prevHigh = history.prior().high();
    const prevLow = history.prior().low();
    if (currentHigh >= prevHigh && deltaValue <= 0 && prevDeltaValue >= 0){
    bearishDivergence = d.high() + (tickSize * this.props.plotInTick);
    }
    if(currentLow <= prevLow && deltaValue >= 0 && prevDeltaValue <= 0){
    bullishDivergence = d.low() - (tickSize * this.props.plotInTick);
    }
    }

    return{
    bearishDivergence,
    bullishDivergence
    };
    }
    }

    module.exports = {
    name: "deltaDivergence",
    title: "Delta Divergence",
    description: "Delta Divergence",
    calculator: deltaDivergence,
    params: {
    plotInTick: predef.paramSpecs.number(2)
    },
    tags: [predef.tags.Volumes],
    inputType: meta.InputType.BARS,
    plotter: [
    predef.plotters.dots('bearishDivergence'),
    predef.plotters.dots('bullishDivergence')
    ],
    plots: {
    bearishDivergence: { title: 'Bearish Divergence', displayOnly: true },
    bullishDivergence: { title: 'Bullish Divergence', displayOnly: true }
    },
    schemeStyles: {
    dark: {
    bearishDivergence: {color: "red"},
    bullishDivergence: {color: "green"}
    }
    }
    };

    #2
    Originally posted by pip_sniper View Post
    Is this something like what you are looking for?

    Included in this Zip are three divergence indies. Two of them (CDDivergence) require Ninjas Order Flow Cum Delta. One uses BA Cum Delta and the other is UpDownTick Cum Delta. The third is a Heiken Ashi Divergence (HADivergence). Each looks for the price bar going opposite direction of the Cum Delta or the calculated Heiken [&#8230;]
    Included in this Zip are three divergence indies. Two of them (CDDivergence) require Ninjas Order Flow Cum Delta. One uses BA Cum Delta and the other is UpDownTick Cum Delta. The third is a Heiken Ashi Divergence (HADivergence). Each looks for the price bar going opposite direction of the Cum Delta or the calculated Heiken […]

    Comment


      #3
      Originally posted by Borgen View Post

      Is this something like what you are looking for?

      https://ninjatraderecosystem.com/use...ce-indicators/
      I think its similar. I'm looking for something that will plot green and red dots above/below the candle when there is a divergence (see below).

      Click image for larger version

Name:	Screenshot 2022-05-31 081612.jpg
Views:	4264
Size:	79.1 KB
ID:	1203441

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      639 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      366 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      569 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      572 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X