OmniTrader Forum OmniTrader 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.

 
Jim Dean

Sage
20001000
Posts: 3022

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Volume Scaling Problem
Posted : 1/14/2014 5:23 AM
Post #30594 - In reply to #30592

This requires OT Pro.

Save code below as an OLang Indic and compile it.
Manually create chart with the VHI indicator showing in a pane
Add the OLang indicator aJDndVolMA to that same pane.

... note ... VHI is a special case ... normally you'd plot it from within the custom indicator, but it is a pain to recreate the color-shading of the VHI from within OLang, so I just took a shortcut here.


#Indicator
'*************************************************************************+
' aJDndVolMA by Jim Dean, 14jan14
'
' Plots VMA on the same scale as V (or VHI which = V)
' To see VHI colors, plot VHI manually on the same pane as this indicator
'*************************************************************************+

#param "VMAperiods", 10

dim VolMA, Lo, Hi as double ' uses double to preserve precision

VolMA = SMA(V,VMAperiods) ' uses Simple MA since not specified

Lo = math.min(VolMA,V)
Hi = math.max(VolMA,V)

setscales(Lo,Hi)

plot("VolMA", VolMA, orange)

return VolMA
Deleting message 30594 : RE: Volume Scaling Problem


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