Hi Nicolas, a while ago you wrote up this nice Coppock code for me, i would like to add an “Exponential moving average 30/15 cross” to it if possible.
This is what I’m after
When the 1. Coppock is below the zero line and the ema(on Coppock) crosses under the Coppock and 2. EMA (on price) 30 crosses under 15 ….enter long.
When the 1. Coppock is above the zero line and the ema (on Coppock) crosses over the Coppock and 2. EMA( on price) 30 crosses over 15 …. enter short.
a = ROC[14](close)
b = ROC[11](close)
coppock = weightedaverage[60](a+b)
avg = average[12,1](coppock)
RETURN coppock as "Coppock curve", 0 as "0 level", avg as "average of coppock"
The code above is the code for the Coppock you wrote, i just need to sync the EMA on price with the Coppock EMA cross on the indicator.
Cheers
Pleidian
Can i get the Drawtext on the code to add “BUY” when the long signal is triggered and “SELL” when the short signal is triggered please?
cheers
P
Pleidian – please use the ‘Insert PRT Code’ button when posting any code. I have tidied up your post for you.
Also it is better if you try to get all your requests within one post rather than spread across several. Perhaps wait for an answer before then asking any follow up questions!
Coppock is below the zero line and the ema(on Coppock) crosses under the Coppock and 2. EMA (on price) 30 crosses under 15 ….enter long.
The crosses would not happen at the same time, do you consider a range of bars to wait for each signal to be sync together?
Where do you want the BUY/SELL text to be displayed please?
Yes the Coppock / EMA cross and the EMA cross on price will occur at different times but not too far apart. It would be nice to have BUY or SELL text on price if possible when both have triggered.
Range bars? Lets say 10 range bars. Something variable that i can change the setting like a moving average would be nice so i can use it on 4 hour and daily charts.
Yeah sorry Vonasi I’m a bit sloppy with my posting protocol, i,ll try and lift my game.
cheers