Slope on VWAP
-
Hello,
I would like to code on mql 5, a condition link to VWAP's slope. For example : slope <0.01 => trade Ok
I already have the VWAP indicator but I do not know how to create this "slope condition".
I know the formule : slope = (VWAP-VWAP[6])/VWAP[6] ; if VWAP>=VWAP[6]
But I really do not know how to correctly code it, if somebody help me with this please ?
-
@gonannster That will depend on the indicator's buffers. Are you sure fxDreema identified them correctly? Sadly many mq5 indicators are not working on fxDreema because of that.
-
@l-andorrà no I do not know, how to know that please ? And overall how to code this kind of formula in mql ?
z = (VWAP-VWAP[6])/VWAP[6]) or more globally : z = (x-y)/y ??Thanks a lot for any help you'll give

-
@gonannster Can you please share the indicator? I will take a look at it before suggesting anything about the formula.
-
0_1619805825702_Volume Weighted Average Price.ex5
0_1619806064198_VWAP_Custom_Position.mq5
In fact, I would like to code it from .itf (PRT) to mql language. For example :
"
PENTE VWAP (volumes)
d = max(1, intradaybarindex)IF SUMMATIONd <> 0 Then // <> 0 => différent de 0
VWAP = SUMMATIONd/SUMMATIONdENDIF
IF PlageOKL1 AND VWAP[6] <> 0 THEN
IF VWAP >= VWAP[6] THEN
Slope = (VWAP - VWAP[6]) / VWAP[6]
ELSIF VWAP < VWAP[6] THEN
Slope = (VWAP - VWAP[6]) / VWAPENDIF
caVwap1 = Slope < 55/10000ENDIF "
So you see I need a VWAP indicator for mql (with a period input for intradayindex ?) to do this task then I could code it in FxDreema.
Thanks for any help !
-
VWAP = SUMMATIONd/SUMMATIONd here there is an error :
new formula : VWAP = SUMMATION [d] (volume*typicalprice) /SUMMATION [d] (volume)
-
@gonannster I'm afraid fxDreema cannot understand the available buffers. It simply can't identify them. I'm afraid this is a common issue for this plartform. I'm afraid you will need a programmer to edit those indicators manually before using them here.

-
ok thank you for your answer
-
@gonannster You're welcome.