PriceOscillator
Forums › ProRealTime forum Italiano › Supporto ProBuilder › PriceOscillator
- This topic has 6 replies, 3 voices, and was last updated 6 years ago by othello.
Tagged: PPO, Price Oscillator
-
-
11/18/2018 at 1:42 PM #85138
Salve,
vorrei sapere come indicare, a questa funzione, che le due medie mobili devono essere di tipo esponenziale.
Il manuale riporta:
PriceOscillator PriceOscillator[S,L](price) Indicatore Percertage Price oscillator
ma da questa sintassi non mi sembra sia possibile dire se le due medie mobili sono semplici, esponenziali, o altro ancora.
Grazie.
11/18/2018 at 3:50 PM #85148No, infatti non è possibile.
Se sai programmare è facile crearlo, qui c’è la formula
https://www.investopedia.com/terms/p/ppo.asp
http://www.traderpedia.it/wiki/index.php/Price_oscillator_(DOA)
11/18/2018 at 9:30 PM #8515611/19/2018 at 1:24 AM #85158L’ho creato, questo è il codice, con i riferimenti delle fonti, sia per il calcolo in differenza di prezzo che in percentuale.
Decidi tu i periodi delle medie, il tipo di media e se vuoi la differenza in prezzo o in percentuale.
Una volta messo sotto il grafico puoi decidere, dalle proprietà, di colorarlo come vuoi e di visualizzarlo come linea o istogramma tipo Macd:
Price Oscillator - PPO1234567891011121314151617181920212223242526//Percentage Price Oscillator - PPO////The percentage price oscillator (PPO) is a technical momentum indicator that shows the relationship between two moving averages. To calculate the PPO, subtract the 26-period exponential moving average (EMA) from the 12-period EMA, and then divide this difference by the 26-period EMA. The result is then multiplied by 100. The indicator tells the trader where the short-term average is relative to the longer-term average.//// Here is the PPO calculation: ((12-day EMA - 26-day EMA) / 26-day EMA) x 100//// https://www.investopedia.com/terms/p/ppo.asp// http://www.traderpedia.it/wiki/index.php/Price_oscillator_(DOA)//// SlowP = 26 //Periods of Slow Average// FastP = 12 //Periods of Fast Average// AvgType = 1 //Average Type (0=sma, 1=ema, 2=wma,...)// Percentage = 1 //1=calculate Percentage 0=no percentage//DEFPARAM CalculateOnLastBars = 1000SlowP = max(1,min(999,SlowP)) //1 - 999FastP = max(1,min(999,FastP)) //1 - 999AvgType = max(0,min(6,AvgType)) //0 - 6Percentage = max(0,min(1,Percentage)) //1=Percentage 0=NO PercentageSlowAvg = Average[SlowP,AvgType](close)FastAvg = Average[FastP,AvgType](close)Difference = FastAvg - SlowAvgIF Percentage THENDifference = (Difference / SlowAvg) * 100ENDIFRETURN Difference,011/19/2018 at 1:48 AM #85161Ti allego anche la versione tipo MACD (è molto simile):
Price Oscillatgor (PPO) con istogramma tipo Macd1234567891011121314151617181920212223242526272829303132//Percentage Price Oscillator - PPO (with Histogram)////The percentage price oscillator (PPO) is a technical momentum indicator that shows the relationship between two moving averages. To calculate the PPO, subtract the 26-period exponential moving average (EMA) from the 12-period EMA, and then divide this difference by the 26-period EMA. The result is then multiplied by 100. The indicator tells the trader where the short-term average is relative to the longer-term average.//// Here is the PPO calculation: ((12-day EMA - 26-day EMA) / 26-day EMA) x 100//// https://www.investopedia.com/terms/p/ppo.asp// http://www.traderpedia.it/wiki/index.php/Price_oscillator_(DOA)// https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:price_oscillators_ppo// http://www.forexwiki.it/PPO//// SlowP = 26 //Periods of Slow Average// FastP = 12 //Periods of Fast Average// AvgType = 1 //Average Type (0=sma, 1=ema, 2=wma,...)// Percentage = 1 //1=calculate Percentage 0=no percentage// SignalP = 9 //Periods of Signal Average//DEFPARAM CalculateOnLastBars = 1000SlowP = max(1,min(999,SlowP)) //1 - 999FastP = max(1,min(999,FastP)) //1 - 999AvgType = max(0,min(6,AvgType)) //0 - 6Percentage = max(0,min(1,Percentage)) //1=Percentage 0=NO PercentageSignalP = max(1,min(999,FastP)) //1 - 999SlowAvg = Average[SlowP,AvgType](close)FastAvg = Average[FastP,AvgType](close)Ppo = FastAvg - SlowAvgIF Percentage THENPpo = (Ppo / SlowAvg) * 100ENDIFSignalLine = Average[SignalP,AvgType](Ppo)Histo = Ppo - SignalLineRETURN Ppo AS "Ppo",SignalLine AS "Signal",Histo AS "Histogram",011/19/2018 at 10:25 AM #8517611/19/2018 at 6:04 PM #85200 -
AuthorPosts