OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


Only Forum Moderators, Administrators, and the owner of this message may delete it.

 
Steve Johnson

New User

Posts: 3

Joined: 4/29/2020
Location: Olathe, KS

User Profile
 
Subject : RE: Market Profile Indicator
Posted : 9/7/2022 2:32 AM
Post #32088 - In reply to #32030

I was researching the MT indicator and ran across your thread. At first I didn't think the indicator worked for smaller timeframes, but I did find that a function like SUM for 3 five min bars while in 15 min timeframe was indeed the same result as adding each of the 5 min bars within that 15 min bar.

You are correct that the value returned for OLHCV is the last lower timeframe bar within the larger timeframe. Then it hit me to try this:

MT(V[1],"5M",0) to get the previous 5 min bar. Unfortunately, OT didn't like that syntax and wouldn't compile.

But wait! Wrap V[1] inside an indicator and maybe...

ExtractV.txt

#Indicator
#Param "Barsback", 0
Dim mydata As single
mydata = V[Barsback]
Return mydata

Then: MT(ExtractV(2),"5M",0) will give you the first 5 min volume bar from the 15 min bar.

I tried to build an elegant solution where I could pass in the data type (OLHCV), bars to look back, lower timeframe number (e.g. -1) and # of lower timeframe bars covered by the current timeframe, but the ExtractV indicator would not work using variables in the MT formula. It just would not compile unless I inserted a simple number for the Barsback parameter. My only solution idea is a large select case structure for each data type and bar position. If you want to cover looking at say 5 min bars from a 60 min current timeframe, you need 12 select case statements for each data type you want to cover.

Hopefully that gives you enough to continue your original idea.
Deleting message 32088 : RE: Market Profile Indicator


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.