Current location | Thread information | |
![]() ![]() ![]() ![]() ![]() ![]() |
Last Activity 3/18/2022 1:29 PM 15 replies, 3195 viewings |
|
|
Printer friendly version |
^ Top | |||
Vinay![]() Elite ![]() ![]() ![]() Posts: 640 Joined: 12/9/2011 Location: Planet Earth ![]() |
When I plot Volume Moving Average (VMA) over the Volume or Volume Heat Indicator (VHI) pane the scaling of VMA Indicator is not proper. In the Chart below you can see that the value of VMA(21) is 2.9 million while the Volume for 10 Feb 2012 is 4.8 million. Logically the VMA line to the extreme right should be BELOW the Volume or VHI lines but on the contrary it is showing above the Volume lines which is improper. Obviously VMA Indicator is using different scaling than the Volume and VHI Indicators. [Edited by Vinay on 3/28/2012 8:26 AM] ![]() | ||
^ Top | |||
Jim Dean![]() Sage ![]() ![]() Posts: 3022 Joined: 9/21/2006 Location: L'ville, GA ![]() |
Try using plotvolume() instead of plot() | ||
^ Top | |||
Vinay![]() Elite ![]() ![]() ![]() Posts: 640 Joined: 12/9/2011 Location: Planet Earth ![]() |
Thanks Jim for your reply but I have not used OmniLanguage or OmniScript to plot these Indicators. In fact I have very little knowledge about OL & OS. I have plotted the Volume & VMA from the built in library of Indicators & VHI from the Volume Systems plugin. | ||
^ Top | |||
Jim Dean![]() Sage ![]() ![]() Posts: 3022 Joined: 9/21/2006 Location: L'ville, GA ![]() |
Unfortunately OT has a weakness when it comes to plotting multiple indicators on the same chart. If the two+ indicators have the same bounded scale, like STOC or RSI, then it works fine. But if either indicator has an unbounded scale (ie flexible max &/or min), then the scale for the two will not be the same. See the overlapping different values on the right of your pic. This happens since OT optimizes the use of vertical space based on the currently-displayed min and max of each indicator, independently. That's a good thing for indic's on a dedicated pane, but messes things up for situations like yours. This usually can be solved simply using OLang, by creating a custom indicator which simply plots the two canned indicators together. There have been many feature requests over the years for OT to be given mor intelligence re plotting multiple indic's manually on a common screen. | ||
^ Top | |||
Vinay![]() Elite ![]() ![]() ![]() Posts: 640 Joined: 12/9/2011 Location: Planet Earth ![]() |
If that is the case then it is a poor reflection on OT. Even other software which costs a fraction of OT can handle these things properly. | ||
^ Top | |||
Barry Cohen![]() Sage ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6338 Joined: 1/19/2004 ![]() |
This is one of those requests that I keep pushing for. | ||
^ Top | |||
Vinay![]() Elite ![]() ![]() ![]() Posts: 640 Joined: 12/9/2011 Location: Planet Earth ![]() |
Originally written by 291234 on 2/13/2012 9:00 PM This is one of those requests that I keep pushing for. Barry ... Will you be kind enough to try once more to get this done? Thanks. [Edited by Vinay on 5/1/2013 10:33 AM] | ||
^ Top | |||
wolf![]() Veteran ![]() ![]() ![]() Posts: 159 Joined: 4/16/2011 Location: Germany ![]() |
I would like to know whether the described Problem by VXP will be provided as a correction Version by Nirvana for all existing OT Version (for all OT Versions below 2013 e.g 2012 etc). As I have understood this issue is related to the core product OT . regards wolfgang | ||
^ Top | |||
Barry Cohen![]() Sage ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6338 Joined: 1/19/2004 ![]() |
The issue remains in OT2013 & VT10. I don't know when we will fix the scaling of indicators on top of indicators. And usually new features are not added to older versions of software. | ||
^ Top | |||
Vinay![]() Elite ![]() ![]() ![]() Posts: 640 Joined: 12/9/2011 Location: Planet Earth ![]() |
Originally written by Jim Dean on 2/12/2012 6:06 PM Unfortunately OT has a weakness when it comes to plotting multiple indicators on the same chart. If the two+ indicators have the same bounded scale, like STOC or RSI, then it works fine. But if either indicator has an unbounded scale (ie flexible max &/or min), then the scale for the two will not be the same. See the overlapping different values on the right of your pic. This happens since OT optimizes the use of vertical space based on the currently-displayed min and max of each indicator, independently. That's a good thing for indic's on a dedicated pane, but messes things up for situations like yours. This usually can be solved simply using OLang, by creating a custom indicator which simply plots the two canned indicators together. There have been many feature requests over the years for OT to be given mor intelligence re plotting multiple indic's manually on a common screen. Jim, will you be kind enough to code it for me. I want VMA to be plotted over VHI Indicator with ability to modify the parameters. Thanks in advance. | ||
^ Top | |||
Jim Dean![]() Sage ![]() ![]() Posts: 3022 Joined: 9/21/2006 Location: L'ville, GA ![]() |
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 | ||
^ Top | |||
Vinay![]() Elite ![]() ![]() ![]() Posts: 640 Joined: 12/9/2011 Location: Planet Earth ![]() |
Jim, Thanks a lot. It does exactly what I wanted. You have been so helpful to all of us. Truly appreciate it. [Edited by Vinay on 1/14/2014 6:22 AM] | ||
^ Top | |||
Jim Dean![]() Sage ![]() ![]() Posts: 3022 Joined: 9/21/2006 Location: L'ville, GA ![]() |
Happy to help. This is an example for folks who don't own OT Pro (yet) of how easy it is to do stuff that is outside the scope of native OT capabilities. OT Pro is the best upgrade for your money to the base OT package, since it offers literally infinite possibilities. This code is a good "template" for combining other things too. The trick is the Lo/Hi/SetScales stuff. Just set up param's to match those for the desired indicators, define a variable to hold the indicator values (like VolMA), calc the values using internal OT function calls, and plot the results (one plot statement per indicator). This example does not plot V since I presumed that you wanted to see the pretty VHI colors. Note - if you try to overlay two indic's on the same scale, make sure their individual scale are "compatible". The routine will automatically display the range as the lowest low to the highest high amongst the two you calc. [Edited by Jim Dean on 1/14/2014 6:30 AM] | ||
^ Top | |||
Vinay![]() Elite ![]() ![]() ![]() Posts: 640 Joined: 12/9/2011 Location: Planet Earth ![]() |
Jim, just out of curiosity was it possible to combine the VMA Indicator you provided with the VHI Indicator into a single Indicator with option to modify all the parameters of both VMA & VHI from a single window? If yes then how would you go about coding it? Thanks once again. | ||
^ Top | |||
Jim Dean![]() Sage ![]() ![]() Posts: 3022 Joined: 9/21/2006 Location: L'ville, GA ![]() |
VHI, as I mentioned before, does not do any "calculations" at all ... the "output value" of VHI is simply "V". So, if you want the Indicator to plot "V", WITHOUT THE PRETTY VHI COLORS, just add the line: plothist("Volume",V,0,blue,2) right before the other plot command. BUT, if you want all the VHI colors or something like that to apply to the Volume Histo, that's something more involved ... very doable ... contact me by email about it ... hvacsage at yahoo.com | ||
^ Top | |||
Vinay![]() Elite ![]() ![]() ![]() Posts: 640 Joined: 12/9/2011 Location: Planet Earth ![]() |
Thanks Jim. For my needs whatever you coded is enough. What I asked was out of curiosity only. |
|
|
Legend | Action | Notification | |||
Administrator
Forum Moderator |
Registered User
Unregistered User |
![]() |
Toggle e-mail notification |