Comparing Volume of bar today relative to yesterday

Questions about MultiCharts .NET and user contributed studies.
Aufidius
Posts: 8
Joined: 01 Jul 2015
Has thanked: 1 time

Comparing Volume of bar today relative to yesterday

Postby Aufidius » 25 Aug 2015

I'm having some trouble writing a signal of an intraday strategy. Basically I'd like to compare a value X (lets say Volume) of the Y bar in today session to the X value of the Y bar in the previous days session.

Or to phrase it another way.

If the Volume of today's 3rd bar of the session is greater than the volume of the 3rd bar of yesterdays session. Enter Long

etc...

My thought was to use "Bars.LastBarInSession" and increment a counter to keep track of the relative bars but that seems like a very sloppy way to solve the problem. Anyone have any other ideas?

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Comparing Volume of bar today relative to yesterday

Postby JoshM » 25 Aug 2015

I think that, if you have a time based chart (so every day the same amount of bars), you can count the number of bars between today's bar and yesterday's bar with the same time. Then use `Bars.FullSymbolData.Ticks[x]` to get the volume from yesterday and compare it to the current bar.


Return to “MultiCharts .NET”