TradeStation Volume Ratio - for Ninja 6.5 - NinjaTrader Programming | futures io social day trading
futures io futures trading

TradeStation Volume Ratio - for Ninja 6.5
Updated: Views / Replies:2,411 / 2
Created: by Todd Attachments:0

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Thread Tools Search this Thread

TradeStation Volume Ratio - for Ninja 6.5

  #1 (permalink)
Elite Member
Alpharetta, GA
Futures Experience: Intermediate
Platform: ninja
Broker/Data: Mirus / Zenfire
Favorite Futures: ES
Todd's Avatar
Posts: 257 since Jun 2009
Thanks: 28 given, 40 received

TradeStation Volume Ratio - for Ninja 6.5

I use TradeStation and Ninja Trader. I found the following code for something called Volume Ratio. I'm thinking that this is an indicator that comes with their standard package. Can someone tell me if something exists like this for ninja? This seems like a great indicator. It was very easy to see the volume divergence on ES today.. see screenshot.

Here is the code for the indicator...
AvgLength14 ), 
UpVolAlertPct), { UpVol alert if AvgUpVolPct DnVolPct ) > UpVolAlertPct }
DnVolAlertPct( -), { DnVol alert if AvgUpVolPct DnVolPct ) <
DnVolAlertPct }
ColorNormLength14 ), { Number of bars over which to normalize the indicator
for gradient coloring.  See also:  comments in function NormGradientColor. }
UpColorYellow ), { Color to use for indicator values that are relatively high
  over ColorNormLength bars
. }
DnColorCyan ) ;  { Color to use for indicator values that are relatively low
  over ColorNormLength bars
. }
Set either UpColor and/or DnColor to -1 to disable gradient plot coloring.
When disabledPlot1 color is determined by settings in indicator properties
 dialog box
.  Plot2 (ZeroLinecolor always comes from indicator properties
    dialog box
. }
ColorLevel) ;
BarType <= 1 then ie, if tick or minute bars }
UpTicks DownTicks ;
TotalTicks 0 then
100 * ( UpTicks DownTicks ) / TotalTicks 
VolRatio ;
VolRatioAvg XAverageVolRatioAvgLength ) ; 
Plot1VolRatioAvg"VolRatioAvg" ) ;
Plot20"ZeroLine" ) ;
Gradient coloring }
UpColor >= and DnColor >= 0 then
DnColor ) ;
SetPlotColor1ColorLevel ) ;
end ;
Alert criteria }
VolRatioAvg crosses over UpVolAlertPct then
"UpVol alert" )
 else if 
VolRatioAvg crosses under DnVolAlertPct then
"DnVol alert" ) ;

Last edited by sam028; March 26th, 2010 at 05:10 PM.
Reply With Quote
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

  #3 (permalink)
Elite Member
Salt Lake City, UT
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Dormans/Zen-fire
Favorite Futures: 6E ES YM
Posts: 233 since Mar 2010
Thanks: 46 given, 324 received

I've seen similar indicators for this in Ninja

I know Ninja, I don't know TS. There are versions similar to this for Ninja (but without the alerts). I say similar because I don't understand how TS defines an uptick verus a downtick....knowing this defintion defines the behavior of the indicator. For example is an uptick defined as a sale at or above the ASK or is an uptick simply above the last sale - or something other? Another consideration is the tic value based on trades (number of orders ) or on contracts/trade (this is what typical volume is, total number of contracts)...for example 1 trade can be for 10 contracts - so does TS use a value of 1 or a value of 10 when it adjusts the the uptick or downtic variables? The term tic gets used interchangeably here.

I have created a number of indicators for Ninja focused on this. One simply overrides the OnMarketData method to access this level of information. You then decide how you want to accumulate the values based on your defined logic.

The logic within this TS code looks to be: defines alert factors based on +-5%, define totaltics as uptics+downtics, the volume ratio is defined as ((uptics-downtics)/totaltics ) normalized to fit in a +-100 value range, this is calculated for each bar and averaged over a 14 bar period to smooth out spikes. Gradient color is applied with + values moving towards blue and - values moving towards red.

I assume the TS XAverage is an eXpoential average?

if I read this correctly, it would be relatively easy to duplicate in ninjascript, but I am certain there are similar version in the indicator download area of the support forum.

Reply With Quote


futures io > > > > > TradeStation Volume Ratio - for Ninja 6.5

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

July Journal Challenge - $500 in Amazon Gift Cards!


AXESS Trader: Powerful Cloud Based Trading Platform w/GFF Brokers

Jul 17

TBA: FuturesTrader71 w/Morad Askar

Elite only

Similar Threads
Thread Thread Starter Forum Replies Last Post
fractal pivots (tradestation) for ninja trader esam_jir NinjaTrader Programming 11 March 2nd, 2012 09:44 AM
Convert Ninja Indicators to Tradestation daytrader4 The Elite Circle 2 December 15th, 2010 04:16 PM
Indi from Tradestation to Ninja 7.. edi025 NinjaTrader Programming 5 December 11th, 2010 07:42 PM
Get TradeStation talking to Ninja with GV? drmartell Traders Hideout 5 November 1st, 2010 10:48 AM

All times are GMT -4. The time now is 05:27 PM. (this page content is cached, log in for real-time version)

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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
Page generated 2018-07-16 in 0.10 seconds with 14 queries on phoenix