Intrabar Median

Questions about MultiCharts and user contributed studies.
wall richard
Posts: 60
Joined: 28 Dec 2007
Has thanked: 9 times
Been thanked: 1 time

Intrabar Median

Postby wall richard » 27 Jul 2008

I am searching for a study that calculates the median intrabar price. Any help appreciated. I suspect it will involve the opening tick and close with closing tick for a given bar interval.

Stork

User avatar
TJ
Posts: 6585
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

Postby TJ » 27 Jul 2008

if you can come up with the logic or formula, it can be programmed.

brodnicki steven
Posts: 407
Joined: 01 Jan 2008
Been thanked: 3 times

Postby brodnicki steven » 28 Jul 2008

If you want the median(middle) price you would do something like-
((H-L)/2) + L

User avatar
RobotMan
Posts: 375
Joined: 12 Jul 2006
Location: Los Altos, California, USA
Has thanked: 31 times
Been thanked: 12 times
Contact:

Postby RobotMan » 28 Jul 2008

// MedianPrice is an EL reserved word.
// If Median Price is calculated on every bar and median price is (H+L)/2 then:

Value1 = MedianPrice ;
Plot1(Value1,"MedianPrice") ;

Bob Perry
Los Altos, CA
Attachments
MedianPrice p196.jpg
MedianPrice p196.jpg (23.39 KiB) Viewed 212 times

User avatar
TJ
Posts: 6585
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

Postby TJ » 28 Jul 2008

medianprice is supported by MC.

It is in the PowerEditor's hint, but not in the dictionary.

It is also not in the PowerLanguage chm file.

wall richard
Posts: 60
Joined: 28 Dec 2007
Has thanked: 9 times
Been thanked: 1 time

Postby wall richard » 28 Jul 2008

The original query was for INTRABAR median price. Most replies are for bar median price.

Basically, each individual bar, as chosen, contains an opening tick and a closing tick. Between the two there is a median tick. I'm sure there is no MC study or function for an intrabar median. Basically an array will have to be set up to capture the ticks intrabar, count and sort the ticks then calculate a median tick value in real time. TS has intrabrapersist and dynamic arrays. I'm not sure about MC, but I don't think MC has these capabilities. So a loop needs to function intrabar from open tick to close tick and this data must be put into a tick array, counted, sorted and a medianarray calculated.

Certain bar intervals, such as range bars, require dynamic arrays rather than fixed arrays since they have variable tick counts.

Thanks,

Stiork

wall richard
Posts: 60
Joined: 28 Dec 2007
Has thanked: 9 times
Been thanked: 1 time

Postby wall richard » 28 Jul 2008

Please excuse underlining of last post. I thought it was going under INTRABAR.

Stork

User avatar
RobotMan
Posts: 375
Joined: 12 Jul 2006
Location: Los Altos, California, USA
Has thanked: 31 times
Been thanked: 12 times
Contact:

Postby RobotMan » 28 Jul 2008

Yes, well... good luck with that!

Bob Perry
Los Altos, CA

User avatar
ABC
Posts: 524
Joined: 16 Dec 2006
Has thanked: 111 times
Been thanked: 295 times
Contact:

Postby ABC » 28 Jul 2008

You can use intrabarpersist and dynamic arrays with Multicharts as well, it's fully supported.

Regards,

ABC

User avatar
TJ
Posts: 6585
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

Postby TJ » 28 Jul 2008

Just to be sure we are on the same wavelength... Median is not the same as Average.

Arithmetic, Statistics: the middle number in a given sequence of numbers:
4 is the median of 1, 3, 4, 8, 9.
5 is the average of the same series.


Non-technical people interchange the application of the two on non-technical situations.

For most intend and purposes, using Average in place of Median do not significantly affect the outcome of an non-critical application, especially when the population is very large and normally distributed.

wall richard
Posts: 60
Joined: 28 Dec 2007
Has thanked: 9 times
Been thanked: 1 time

Postby wall richard » 28 Jul 2008

TJ

Median is correct. Average or mean may come close in a normal distribution. But, in this situation, tick distribution in a bar is far from a normal Gaussian distribution. And, this is a good thing too because the most critical thing in charting is the final "closing position" in the last bar interval.

I'm very happy ABC informs us that dynamic arrays and intrabarpersist are present and functional in MC. Should make programming much easier than doing it piece meal.

Stork


Return to “MultiCharts”