PPO : existence de bug
Forums › ProRealTime forum Français › Support ProOrder › PPO : existence de bug
- This topic has 4 replies, 2 voices, and was last updated 4 years ago by finplus.
Viewing 5 posts - 1 through 5 (of 5 total)
-
-
06/28/2020 at 2:38 PM #137403PPO Code juanj • 12/07/2018)1234567891011121314151617181920212223242526272829303132333435363738Defparam cumulateorders = Falsepossize = 1SlowP = 26 //Periods of Slow AverageFastP = 12 //Periods of Fast AverageAvgType = 1 //Average Type (0=sma, 1=ema, 2=wma,…)Percentage = 1 //1=calculate Percentage 0=no percentageSignalP = 9 //Periods of Signal Average//SlowP = 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 – SignalLineIf longonmarket and histo < 0 or <strong>ppo 0</strong> or ppo > SignalLine ThenExitshort at marketEndIfIf ppo > 0 and <strong>signalLine SignalLin</strong>e ThenIf shortonmarket ThenExitshort at marketEndIfBuy possize contract at market<strong>ElsIf ppo 0</strong> and ppo < SignalLine ThenIf longonmarket ThenSell at marketEndIfSellshort possize contract at marketEndIf
bonjour,
j’ai récupéré le code ci-joint sur Prorealcode. Mais j’ai deux problèmes
- je pense que le code comporte des bugs (ex deux signalLine à la suite, des “pop 0” sans signe entre les “ppo” et “0” en gras dans le code).
- J’ai essayé de corriger (j’ai supprimé un “signalLine”, j’ai mis (au pif” un signe “=” dans le premier ppo et un signe “<” dans le deuxième ppo. Et j’ai testé en back test : je me suis aperçu que le code ne permettait que des entrées “long” autrement dit ne fait qu’acheter”.
Quelqu’un aurait il le code corrigé ? Merci d’avance.
06/29/2020 at 8:30 AM #13745106/29/2020 at 1:57 PM #137501https://www.prorealcode.com/prorealtime-indicators/percentage-price-oscillator-ppo/
voilà j’ai retrouvé le lien.
06/29/2020 at 2:16 PM #13750306/30/2020 at 6:06 PM #137785 -
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)