Maybe someone can help me. In this months issue(2/17) of Stocks and Commodities there is a trading strategy which use Volume Weighted Moving Average to id breakouts.
I have searched hi and low for the MC or EL VWMA code and can't find one that works correctly. I've tried writing it myself with no success.
If someone has a running version, could you share?
Volume Weighted Moving Average code (VWMA) [SOLVED]
- CrazyNasdaq
- Posts: 321
- Joined: 02 Sep 2009
- Location: ITALY
- Has thanked: 98 times
- Been thanked: 89 times
Re: Volume Weighted Moving Average code (VWMA) [SOLVED]
Maybe this code can help you
Code: Select all
inputs:
Lunghezza(20);
vars:
PMi( 0 ),
Vi( 0 ),
PMvi( 0 ),
Sum.PMVi( 0 ),
Sum.Vi( 0 ),
VWMA( 0 );
PMi = avgPrice;
Vi = volume;
PMvi = Pmi * Vi;
Sum.PMVi = summation(PMVi, lunghezza);
Sum.Vi = summation(Vi, lunghezza);
VWMA = Sum.PMVi / Sum.Vi;
PLot1(vwma, "VWMA");
- CrazyNasdaq
- Posts: 321
- Joined: 02 Sep 2009
- Location: ITALY
- Has thanked: 98 times
- Been thanked: 89 times
Re: Volume Weighted Moving Average code (VWMA)
Buonasera a tutti,
Ho un problema: quando applico il codice del Volume Weighted Moving Average sul Future Eurodollaro Molto spesso mi si apre un pop up rosso di errore, con scritto "Errore di eccezione: operazione non valida a virgola mobile" . Qualcuno mi può aiutare?
Grazie!
Good evening everyone,
I have a problem: when I use the code for the Volume Weight Average on the Fture Eur-Usd a red pop up appears to me saying " Exception Error; Operation not valid to mobile comma". Did it happen to someone else? How did you menage it?
Thank you!
Ho un problema: quando applico il codice del Volume Weighted Moving Average sul Future Eurodollaro Molto spesso mi si apre un pop up rosso di errore, con scritto "Errore di eccezione: operazione non valida a virgola mobile" . Qualcuno mi può aiutare?
Grazie!
Good evening everyone,
I have a problem: when I use the code for the Volume Weight Average on the Fture Eur-Usd a red pop up appears to me saying " Exception Error; Operation not valid to mobile comma". Did it happen to someone else? How did you menage it?
Thank you!
- CrazyNasdaq
- Posts: 321
- Joined: 02 Sep 2009
- Location: ITALY
- Has thanked: 98 times
- Been thanked: 89 times
Re: Volume Weighted Moving Average code (VWMA)
ITA - Probabilmente perché inizia a plottare su una candela che ha volume = zero e un numero diviso zero è impossibile in matematica e ti ritorna l'errore. Cambia la data di inizio della serie storica su cui calcoli il codice e riattiva l'indicatore. Teoricamente dovrebbe risolversi.Buonasera a tutti,
Ho un problema: quando applico il codice del Volume Weighted Moving Average sul Future Eurodollaro Molto spesso mi si apre un pop up rosso di errore, con scritto "Errore di eccezione: operazione non valida a virgola mobile" . Qualcuno mi può aiutare?
Grazie!
Good evening everyone,
I have a problem: when I use the code for the Volume Weight Average on the Fture Eur-Usd a red pop up appears to me saying " Exception Error; Operation not valid to mobile comma". Did it happen to someone else? How did you menage it?
Thank you!
ENG - Probably because it starts plotting on a candle that has volume = zero and a number divided by zero is impossible in math and returns the error to you. Change the start date of the time series on which you calculate the code and reactivate the indicator. Theoretically it should work.
- CrazyNasdaq
- Posts: 321
- Joined: 02 Sep 2009
- Location: ITALY
- Has thanked: 98 times
- Been thanked: 89 times
Re: Volume Weighted Moving Average code (VWMA)
Salve,
purtroppo nell'intraday la curva scompare spesso probabilmente quando i volumi sono a zero. Non si potrebbe in qualche modo risolvere questo problema?
purtroppo nell'intraday la curva scompare spesso probabilmente quando i volumi sono a zero. Non si potrebbe in qualche modo risolvere questo problema?
- CrazyNasdaq
- Posts: 321
- Joined: 02 Sep 2009
- Location: ITALY
- Has thanked: 98 times
- Been thanked: 89 times
Re: Volume Weighted Moving Average code (VWMA)
puoi provare a risolvere cosìSalve,
purtroppo nell'intraday la curva scompare spesso probabilmente quando i volumi sono a zero. Non si potrebbe in qualche modo risolvere questo problema?
Code: Select all
inputs:
Lunghezza(20);
vars:
PMi( 0 ),
Vi( 0 ),
PMvi( 0 ),
Sum.PMVi( 0 ),
Sum.Vi( 0 ),
VWMA( 0 );
PMi = avgPrice;
Vi = volume;
PMvi = Pmi * Vi;
Sum.PMVi = summation(PMVi, lunghezza);
Sum.Vi = summation(Vi, lunghezza);
if Sum.Vi <> 0 then begin
VWMA = Sum.PMVi / Sum.Vi;
end else being
if Sum.Vi = 0 then
VWMA = VWMA[1];
END;
PLot1(vwma, "VWMA");
Re: Volume Weighted Moving Average code (VWMA)
Buongiorno,
purtroppo con questo nuovo codice, la curva non si vede. Non appare proprio sul grafico. Ho visto che nelle sue proprietà, precisamente in "Style" non c'è. Forse questo è il problema? Non lo so. Spero tanto che si possa risolvere. Grazie
purtroppo con questo nuovo codice, la curva non si vede. Non appare proprio sul grafico. Ho visto che nelle sue proprietà, precisamente in "Style" non c'è. Forse questo è il problema? Non lo so. Spero tanto che si possa risolvere. Grazie
Re: Volume Weighted Moving Average code (VWMA)
Aspetta ora rifaccio la procedura Forse ho sbagliato io qualcosa nel copiare
Re: Volume Weighted Moving Average code (VWMA)
Mi da questo errore
syntax error, unexpected 'if'
line 25, column 0
syntax error, unexpected 'if'
line 25, column 0
- CrazyNasdaq
- Posts: 321
- Joined: 02 Sep 2009
- Location: ITALY
- Has thanked: 98 times
- Been thanked: 89 times
Re: Volume Weighted Moving Average code (VWMA)
correggi la scritta "else being" con "else begin" ho sbagliato a digitareMi da questo errore
syntax error, unexpected 'if'
line 25, column 0
Vedrai che ora funziona
Re: Volume Weighted Moving Average code (VWMA)
Grazie di tutto. Fino ad ora nessun problema. Non avrei saputo come fare. Veramente ti ringrazio. Saluti Alessandro
Re: Volume Weighted Moving Average code (VWMA) WITH STANDARD DEVIATION
Hello,
I looking for the indicator Volume Weighted Moving Average with its Standard Deviation . Is there anabody who can help me?
I need code for multicharts
Thank you
Alex
I looking for the indicator Volume Weighted Moving Average with its Standard Deviation . Is there anabody who can help me?
I need code for multicharts
Thank you
Alex