Relative Volume for MC - EasyLanguage Programming | futures io social day trading
futures io futures trading


Relative Volume for MC
Updated: Views / Replies:771 / 6
Created: by bmtrading9 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 90,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

Reply
 
Thread Tools Search this Thread
 

Relative Volume for MC

  #1 (permalink)
Market Wizard
Dallas, TX, USA
 
Futures Experience: Advanced
Platform: TOS
Broker/Data: IB
Favorite Futures: ES, YM, TF, CL, GC and ETF's
 
Posts: 1,789 since Mar 2013
Thanks: 2,909 given, 2,011 received
Forum Reputation: Legendary

Relative Volume for MC

Would anyone please take a look at this code, this code seems to work properly on historical data but not in real time. This is relative volume indicator works on min chart only.

@ABCTG any help?

 
Code
// __RACumVol - Average Cumulative Volume at this time for the last X days. 
// Must be used on minute-type intraday charts 
	 
Inputs:  
 DaysToAvg(14); 
 
Variables:  
    BarInDay(0), 
	BarsToday(0), 
	CumVolToday(0), 
	DayNumber(-99), 
	BarsPerDay(26),  
	TotCumVol(0), 
	AvgCumVol(0), 
	VolPercentile(0); 
 
 
// Declare the array.  Rows = number of days to average; columns = number of bars per day. 
// Add one to rows to avoid using row 0. 
IF BarType = 1 then 
BEGIN 
	value1 = TimeToMinutes(SessionEndTime(0,1)) - TimeToMinutes(SessionStartTime(0,1)); 
	value1 = value1/BarInterval; 
	 
	If FracPortion(value1) = 0 then 
		BarsPerDay = value1 
	else 
		BarsPerDay = value1 + 1 - FracPortion(value1); 
 
//Arrays: VolArray[22,405] (0); // Note max bars of 405 ( 1 minute 9:30 - 16:15 ) 
Arrays: VolArray[22,495] (0); // Note max bars of 495 ( 1 minute 8:00 - 16:15 )
 
If Date<>Date[1] THEN  
BEGIN	 
 
    //If we've passed day 20, then move everybody back a seat. 
	// All of day 2's data in the array goes into day 1, day 3 into day 2, etc, up through 21 into day 20.	 
	IF DayNumber+1 > DaysToAvg +1 THEN  
	BEGIN 
		For Value1=1 to DaysToAvg Begin; {Outer loop - one for each day, 1-20 + current day }	        
           For Value2 = 1 to BarsPerDay Begin; {Inner Loop - one for each bar in a day, 1-26} 
              VolArray[Value1,Value2] = Volarray[Value1+1 ,Value2]; 
	   	   End; 
		End; 
 
	END;	 
 
    // Start/Increment Day Counter.  It never goes above 21. 
	IF Daynumber = -99 THEN DayNumber = 1 {Start of first full day on the chart} 
	ELSE DayNumber = MinList(DayNumber+1,DaysToAvg+1) ;        {Start of a subsequent day, never goes above 21}	 
 
	// Reset cumulative daily bar and volume counters, since on first bar of a new day. 
	CumVolToday = 0; 
	BarsToday = 0;	 
	 
	// Clear out array row number (days to average + 1) for today's data. Previously moved it into day 20 in the array. 
    IF DayNumber >= DaysToAvg  + 1 THEN  
		For Value2 = 1 to BarsPerDay Begin 
			VolArray[DaysToAvg  + 1, Value2] = 0; 
		End;		 
END; {tasks for first bar of each day} 
 
IF Daynumber <> -99 THEN  
BEGIN	 
 
	// Increment bar and volume counters. 
	BarsToday = BarsToday + 1; 
	CumVolToday = CumVolToday + Volume; 
 
	// Store today's cumulative volume into the array, in the column for this bar. 
	VolArray[DayNumber, BarsToday] = CumVolToday; 
END; 
 
// Now calculate the 20-day cumulative average volume through this bar, if we have enough data. 
If Daynumber > DaysToAvg THEN  
BEGIN 
		TotCumVol = 0; 
	    // Add up the cumulative volume through this time for each of the past 20 days. 
		For Value3 = 1 To DaysToAvg Begin 
			TotCumVol = TotCumVol + VolArray[Value3, BarsToday]; 
		End;		 
		// And divide it by the number of days to get the average cumulative daily volume through this time of day. 
		AvgCumVol = IntPortion(TotCumVol / DaysToAvg); 
		// Now compare today's ccumulative volume to the average. 
	    VolPercentile = IFF(AvgCumVol > 0, CumVolToday *100 / AvgCumVol, 0); 
	     
	    Plot1(VolPercentile-100,"VPctAvg");  
	    Plot2(0,"100%"); 
	     
	    //plot1(value1, "TotalCumVol");
	    //plot1(VolPercentile, "AvgCumVol");
	    //plot1((TotCumVol-CumVolToday)/AvgCumVol, "CumVolToday");
END; 
END;

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)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 854 received
Forum Reputation: Legendary


bmtrading9,

what does your debugging show i.e. what happens within the code on realtime bars versus live data? Looking into this will be the first step in tracking the problem down.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #4 (permalink)
Market Wizard
Dallas, TX, USA
 
Futures Experience: Advanced
Platform: TOS
Broker/Data: IB
Favorite Futures: ES, YM, TF, CL, GC and ETF's
 
Posts: 1,789 since Mar 2013
Thanks: 2,909 given, 2,011 received
Forum Reputation: Legendary


ABCTG View Post
bmtrading9,

what does your debugging show i.e. what happens within the code on realtime bars versus live data? Looking into this will be the first step in tracking the problem down.

Regards,

ABCTG

I have to find it out how to debug in MC, If you plot it it will plot perfectly on historical min data but if you watch this indicator real time, plot is way different worst part is I don't even remember where I got this code, it looks like TS code.

Sent from my SAMSUNG-SM-G900A using Tapatalk

Reply With Quote
 
  #5 (permalink)
 Vendor: tradingcode.net 
The Netherlands
 
Futures Experience: None
Platform: MultiCharts, TradingView
Favorite Futures: ...
 
Jura's Avatar
 
Posts: 774 since Apr 2010
Thanks: 2,347 given, 661 received


bmtrading9 View Post
I have to find it out how to debug in MC, If you plot it it will plot perfectly on historical min data but if you watch this indicator real time, plot is way different worst part is I don't even remember where I got this code, it looks like TS code.

It may be TS code, but none of the statements contain something that isn't possible in MultiCharts.

What are your indicator settings in real time? From your description, I suspect you're using the 'Update on every tick' setting enabled. With that option, the indicator processes every real time tick. Since MultiCharts indicators only calculate on the close of each bar on historical data, in effect your indicator will calculate differently on historical data (once per bar) than on real-time data (numerous times per bar).

I would disable the 'Update on every tick' option and then see how the behaviour in real time is. Here's more on that setting: Wiki: Update on every tick.

Reply With Quote
The following 2 users say Thank You to Jura for this post:
 
  #6 (permalink)
Market Wizard
Dallas, TX, USA
 
Futures Experience: Advanced
Platform: TOS
Broker/Data: IB
Favorite Futures: ES, YM, TF, CL, GC and ETF's
 
Posts: 1,789 since Mar 2013
Thanks: 2,909 given, 2,011 received
Forum Reputation: Legendary


Jura View Post
It may be TS code, but none of the statements contain something that isn't possible in MultiCharts.

What are your indicator settings in real time? From your description, I suspect you're using the 'Update on every tick' setting enabled. With that option, the indicator processes every real time tick. Since MultiCharts indicators only calculate on the close of each bar on historical data, in effect your indicator will calculate differently on historical data (once per bar) than on real-time data (numerous times per bar).

I would disable the 'Update on every tick' option and then see how the behaviour in real time is. Here's more on that setting: Wiki: Update on every tick.

Thanks, that might be it I will verify it on Monday

Sent from my SAMSUNG-SM-G900A using Tapatalk

Reply With Quote
 
  #7 (permalink)
Market Wizard
Dallas, TX, USA
 
Futures Experience: Advanced
Platform: TOS
Broker/Data: IB
Favorite Futures: ES, YM, TF, CL, GC and ETF's
 
Posts: 1,789 since Mar 2013
Thanks: 2,909 given, 2,011 received
Forum Reputation: Legendary


Jura View Post
It may be TS code, but none of the statements contain something that isn't possible in MultiCharts.

What are your indicator settings in real time? From your description, I suspect you're using the 'Update on every tick' setting enabled. With that option, the indicator processes every real time tick. Since MultiCharts indicators only calculate on the close of each bar on historical data, in effect your indicator will calculate differently on historical data (once per bar) than on real-time data (numerous times per bar).

I would disable the 'Update on every tick' option and then see how the behaviour in real time is. Here's more on that setting: Wiki: Update on every tick.

Nope, didn't solve it. Same issue.

Sent from my SAMSUNG-SM-G900A using Tapatalk

Reply With Quote

Reply



futures io > > > > > Relative Volume for MC

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Relative Volume Indicator soulartist NinjaTrader 102 September 19th, 2017 01:28 PM
Relative Volume for Sierra Chart Big Mike Sierra Chart 38 April 19th, 2016 03:59 PM
Relative Volume steve2222 Terms (Glossary) 0 February 13th, 2016 03:12 AM
Using Relative Volume halperin Emini Index Futures Trading 2 August 19th, 2015 06:07 PM
A little help with Marney Volume Indicator for MC Laurus12 EasyLanguage Programming 6 November 2nd, 2011 07:57 PM


All times are GMT -4. The time now is 12:54 AM.

Copyright © 2017 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
Page generated 2017-12-14 in 0.16 seconds with 19 queries on phoenix via your IP 54.221.93.187