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.

 
roberthalljr

Member

Posts: 13

Joined: 3/4/2007

User Profile
 
Subject : RE: volume system help
Posted : 5/14/2023 3:32 PM
Post #32246 - In reply to #31187

Maybe this will help. If I understand correctly your request, you are looking for today's volume relative to the average volume over the past 20 days as a percentage. Here is the code, paste it into indicator file under VBA and compile it in Omnitrader or you can copy and paste it into the EDIT section for Omnilanguage as a NEW indicator, then compile it. The code does compile and will appear in the indicator pane on the chart if you choose to do so.

#Indicator

Dim f1 as Single

f1 = V/AVG(V,20) * 100

Return f1 ' Return the value calculated by the indicator

Plot("VolPerCentDiff",f1,red,2)


Deleting message 32246 : RE: volume system help


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