Cumulative delta algo ? - futures io
futures io futures trading



Cumulative delta algo ?


Discussion in NinjaTrader

Updated
    1. trending_up 3,131 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Cumulative delta algo ?

(login for full post details)
  #1 (permalink)
Paris, France
 
Experience: Intermediate
Platform: SC, NT, ToS
Trading: CME & Eurex Futures
 
Posts: 116 since Apr 2011
Thanks: 339 given, 193 received

Hi,

I use GomCD but would like to have a better understanding of the Cumulative Delta algorithm because it can be applied on volume but also on trades, etc...
This may look obvious, but I believe it is not. For ex, what happens when Bid=Ask.

I would appreciate your comments on :
1. the definition of cumulative delta volume
2. or, on the ninja pseudo code below.

Cumulatice delta volume is :
Delta is up when Price is at or above Ask, down when Price is at or below Bid.
when Ask = Bid, Delta is unchanged.

And can be coded as follow :
 
Code
double currentBid         = 0;
double currentAsk         = 0;
double currentPrice     = 0;
long   currentVolume   = 0;
long   cumulativeDelta     = 0;

protected override void OnMarketData(MarketDataEventArgs e)
{
    if    ( e.MarketDataType == MarketDataType.Bid ) 
        currentBid    =    e.Price;
    else if    ( e.MarketDataType == MarketDataType.Ask ) 
        currentAsk    =    e.Price;
    else if ( e.MarketDataType == MarketDataType.Last ) 
    {
        currentPrice = e.Price;
        currentVolume= e.Volume;
        
        if ( currentPrice >= currentAsk )
            cumulativeDelta += currentVolume;
        if ( currentPrice <= currentBid )
            cumulativeDelta -= currentVolume;
    }
}
Thank you.
W.

-- The rest is silence
Started this thread Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Cumulative delta algo ?


Last Updated on September 8, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts