Re: Volume Indicators for MT4

661
naluvs01 wrote: Wed Nov 08, 2023 3:30 am By the way, if it's not too much trouble, can you add a MA with alerts? Thanks again for your time and consideration!!!!!!!!!!!!!!!!
Ma and alerts added.
These users thanked the author mrtools for the post (total 8):
TransparentTrader, 太虚一毫, naluvs01, ParallelNative, Krunal Gajjar, SijjiN, simon_n3z, alexm


Re: Volume Indicators for MT4

662
mrtools wrote: Wed Nov 08, 2023 3:55 am Ma and alerts added.
Mr. Tools, Mr. Tools, Mr. Tools, Mr. Tools, Mr. Tools...thank you! I don't know why you do what you do, but I am forever appreciative of your work and will forever have gratitude for your time and expertise. I pray that you have eternal success in all your endeavors and thank you again for your unselfish time helping people as myself, strive to change our financial future.

It's been a journey that would have been IMPOSSIBLE without your help!!!!
These users thanked the author naluvs01 for the post (total 3):
BeatlemaniaSA, mrtools, Jimmy


Re: Volume Indicators for MT4

667
Woodyz wrote: Sun Nov 26, 2023 5:55 pm Thank's for the effort Mate
I have already looked at those & not what I'm wanting.
Again thank you
Trading view has it available as one of their std indi's
Image

Here's something interesting I found: https://www.tradingview.com/support/sol ... ored-vwap/

This is a basic tutorial explaining how the default drawing tool works, along with the options you have to adjust the bands and change the colors.

To be more specific:
Bands Calculation Mode can be set to "Standard Deviation" or "Percentage"
You have the option for up to 3 sets of bands, each with their own multiplier.
Source can be: Open, High, Low, Close, HL2, HLC3, OHLC4, HLCC4
You can change the color for the VWAP line and the upper/lower lines individually for each of the 3 sets of bands included.

Since it's a drawing tool, I first thought there isn't a script for it like there is for the other open-source indicators on TradingView.

But back in October 2021, when TradingView released a new interactive input mode for Pine scripts, they used the Anchored VWAP as an example and gave away the source code for doing so.

"This is code for an Anchored VWAP indicator where the anchor point is set interactively, just as with the drawing tool of the same name:"

Code: Select all

//@version=5
indicator("Anchored VWAP", overlay=true)
src = input.source(hlc3, "Source")
startCalculationDate = input.time(timestamp("20 Jan 2021"), "Start Calculation", confirm=true)
vwap_calc() =>
    var srcVolArray = array.new_float(na)
    var volArray = array.new_float(na)
    if startCalculationDate <= time
        array.push(srcVolArray, src*volume)
        array.push(volArray, volume)
    else
        array.clear(srcVolArray), array.clear(volArray)
    array.sum(srcVolArray)/array.sum(volArray)
anchoredVwap = vwap_calc()
plot(anchoredVwap, "VWAP", linewidth=3)
"When it is necessary to select both a price and time simultaneously, use an inline parameter with the same value in both function calls:"

Code: Select all

//@version=5
indicator("Point", overlay=true)
myPrice = input.price(100, inline="Point", confirm=true)
myTime = input.time(timestamp("2020-02-20"), inline="Point", confirm=true)
lblText = str.format("Price: {0, number}\nTime: {1, date} {1, time}", myPrice, myTime)
var l1 = label.new(myTime, myPrice, lblText, xloc=xloc.bar_time)
"After adding an indicator and making an initial interactive selection on the chart, you can modify the selection points by selecting the indicator and moving the points on the chart."

Someone then turned this into a script on TradingView and the code is below:

Code: Select all

//@version=5
indicator("Anchored VWAP", overlay=true)
src = input.source(hlc3, "Source")
startCalculationDate = input.time(timestamp("20 Jan 2021"), "Start Calculation", confirm=true)
vwap_calc() =>
    var srcVolArray = array.new_float(na)
    var volArray = array.new_float(na)
    if startCalculationDate <= time
        array.push(srcVolArray, src*volume)
        array.push(volArray, volume)
    else
        array.clear(srcVolArray), array.clear(volArray)
    array.sum(srcVolArray)/array.sum(volArray)
anchoredVwap = vwap_calc()
plot(anchoredVwap, "VWAP", linewidth=3)
mrtools, kvak, or any of the programmers here: Using the information provided above, would it be indeed possible to create the type of Anchored VWAP that Woodyz is looking for? Or does it already exist on MT4 in some fashion?
These users thanked the author TransparentTrader for the post (total 2):
BeatlemaniaSA, moey_dw


Who is online

Users browsing this forum: Abdi, Bing [Bot], ChatGPT [Bot], DotNetDotCom [Bot], Grapeshot [Bot] and 417 guests