UpTick/Downtick Calculations - EasyLanguage Programming | futures io social day trading
futures io futures trading

UpTick/Downtick Calculations
Updated: Views / Replies:5,926 / 3
Created: by clement 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

UpTick/Downtick Calculations

  #1 (permalink)
Trading Experience: Intermediate
Platform: MultiCharts
Broker/Data: IB/IQFeed
Favorite Futures: YM
clement's Avatar
Posts: 6 since Dec 2011
Thanks: 3 given, 0 received

UpTick/Downtick Calculations

Hi guys,

I wrote a short snippet to count the number of upticks and downticks in Multicharts. I wrote this as I am not sure the default "UpTicks" and "DownTicks" reserved keyword does what it is suppose to, which is to count UpTicks as the number of ticks that are done at a higher price then the tick immediately preceding it and vice-versa for DownTicks. I am unsure because UpTicks + DownTicks = Ticks, which means that each tick is always higher or lower than the preceding tick and that there are no ticks that are done at the same price at the preceding tick. I'm not sure what the UpTicks and DownTicks values are counting, if somebody could clarify it would be greatly appreciated. Anyways, I wrote the short code snippet below but I cannot get it to update properly on a 100-tick chart. I want to count all the upticks within the 100-tick chart. It looks like if the 100-tick chart moves up, upticks only go up by one, instead of all the upticks withing the 100-tick bar. It is also incredibly slow to calculate. Do I have some big inefficiency in my code? Or is what I am asking just really too much to calculate in real-time?

    UpColor( Green ),
    DownColor( Red ),
    DailyReset( true );
    intrabarpersist UpTick( false ),
    intrabarpersist DownTick( false ),
    intrabarpersist avgTicks( 0 ),
    intrabarpersist cumulativeTicks( 0 ),
    intrabarpersist upTickCount( 0 ),
    intrabarpersist downTickCount( 0 );
once cleardebug;

if DailyReset and time = 0630 then cumulativeTicks = 0;

UpTick = close > close[ 1 ];
DownTick = close < close[ 1 ];

if UpTick then UpTickCount = upTickCount[ 1 ] + 1;
if DownTick then DownTickCount = downTickCount[ 1 ] + 1;

if UpTick then cumulativeTicks = cumulativeTicks[ 1 ] + 1;
if DownTick then cumulativeTicks = cumulativeTicks[ 1 ] - 1;

avgTicks = XAverage( cumulativeTicks, 3 );

print( "========= Bar ", currentbar );
print( "UpTicks: ", upTickCount, "; DownTicks: ", downTickCount );
print( "CumulativeTicks: ", cumulativeTicks ); 

Plot1( cumulativeTicks, "Cumulative Ticks" );
Plot2( UpTickCount, "UpTick Count" );
plot3( DownTickCount, "DownTick Count" );

condition1 = UpColor >= 0 and DownColor >= 0;
if condition1 then
        value1 = NormGradientColor( cumulativeTicks, true, 14, UpColor, DownColor );
        SetPlotColor( 1, value1 );
Many thanks,

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)
Trading Experience: Advanced
Platform: MultiCharts, MT4, NT
Favorite Futures: EUR/USD
Squib's Avatar
Posts: 4 since Jan 2012
Thanks: 4 given, 1 received

clement View Post
Hi guys,
I'm not sure what the UpTicks and DownTicks values are counting, if somebody could clarify it would be greatly appreciated.

Hi Clement,
when you use upticks/downticks instructions, you have to ensure, that you have set Build Volume On is set to Tick Count (Format Instruments - Settings).
UpTicks counts only ticks, which are higher then the preceding.
DownTicks counts only ticks, which are lower then the preceding.

Regarding your code. I think the problem is following:
UpTick = close > close[ 1 ];
DownTick = close < close[ 1 ];
You compare the close of the previous bar with the current tick. The previous bars close does not change...
You need to store the previous tick in a separate variable and compare it then against the current tick.
A similar problem is with
UpTickCount = upTickCount[ 1 ] + 1;
You add 1 to the value of the previous bar. You have to remove the [1]!

Reply With Quote
The following user says Thank You to Squib for this post:
  #4 (permalink)
Site Administrator
Manta, Ecuador
Trading Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
Big Mike's Avatar
Posts: 47,603 since Jun 2009
Thanks: 30,338 given, 89,721 received

If you search for MultiCharts Cumulative Delta you'll find this has been explored in detail.


Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member (see why)

Follow me on Twitter Visit my Facebook Visit my futures io Trade Journal Reply With Quote


futures io > > > > > UpTick/Downtick Calculations

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

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now

Show us your trading desks and win over $5,000 in prizes w/Jigsaw Trading


Trading Nadex Touch Bracket Contracts Sized Like Micro Futures w/Nadex

Sep 17

The Spirituality of Trading w/Dr Brett Steenbarger

Elite only

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bring Back the Uptick Rule! kbit News and Current Events 0 August 30th, 2011 10:45 PM
MultiCharts and IQFeed vs TradeStation for UpTick/DownTick data SPTrading MultiCharts 13 June 22nd, 2011 01:35 AM
Pivot Point calculations trendisyourfriend Investor/RT 11 May 2nd, 2011 06:50 PM
Slippage Calculations for Optimization benharrell Traders Hideout 7 December 20th, 2010 03:53 AM
OHLC calculations indicator vast NinjaTrader Programming 3 January 16th, 2010 05:43 AM

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

Copyright © 2019 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