Patrik

PE_Price_Oscillator

164 0 13
Hello!

This is similiar to the Price Oscillator ( PPO) that you can find in the Technical Analysis: Built ins.
It is just added colors so you can see patterns when the lines( histogram) are crossing , maybe add some alerts when plots are crossing different levels.
I want to say that I´m no expert in this area, I just had an idea about this and wanted to see if it was possible to create an oscillator that in some way explains the power inside, so this is what i come up with.
hope you like, feel free to change

All the best
Patrik
Remove from Favorite Scripts Add to Favorite Scripts
study("PE_Price_Oscillator")
// Created by Patrik Enberg. 20150502
// Updated 20150502
// Patrik_Enberg

diff00=close - close[10]
diff01=close - close[9]
diff02=close - close[8]
diff03=close - close[7]
diff04=close - close[6]
diff05=close - close[5]
diff06=close - close[4]
diff07=close - close[3]
diff08=close - close[2]
diff09=close - close[1]

diff0=close[1] - close[11]
diff1=close[1] - close[10]
diff2=close[1] - close[9]
diff3=close[1] - close[8]
diff4=close[1] - close[7]
diff5=close[1] - close[6]
diff6=close[1] - close[5]
diff7=close[1] - close[4]
diff8=close[1] - close[3]
diff9=close[1] - close[2]

diff10=close[2] - close[12]
diff11=close[2] - close[11]
diff12=close[2] - close[10]
diff13=close[2] - close[9]
diff14=close[2] - close[8]
diff15=close[2] - close[7]
diff16=close[2] - close[6]
diff17=close[2] - close[5]
diff18=close[2] - close[4]
diff19=close[2] - close[3]



diff20=close[3] - close[13]
diff21=close[3] - close[12]
diff22=close[3] - close[11]
diff23=close[3] - close[10]
diff24=close[3] - close[9]
diff25=close[3] - close[8]
diff26=close[3] - close[7]
diff27=close[3] - close[6]
diff28=close[3] - close[5]
diff29=close[3] - close[4]

diff30=close[4] - close[14]
diff31=close[4] - close[13]
diff32=close[4] - close[12]
diff33=close[4] - close[11]
diff34=close[4] - close[10]
diff35=close[4] - close[9]
diff36=close[4] - close[8]
diff37=close[4] - close[7]
diff38=close[4] - close[6]
diff39=close[4] - close[5]

diff40=close[5] - close[15]
diff41=close[5] - close[14]
diff42=close[5] - close[13]
diff43=close[5] - close[12]
diff44=close[5] - close[11]
diff45=close[5] - close[10]
diff46=close[5] - close[9]
diff47=close[5] - close[8]
diff48=close[5] - close[7]
diff49=close[5] - close[6]

diff50=close[6] - close[16]
diff51=close[6] - close[15]
diff52=close[6] - close[14]
diff53=close[6] - close[13]
diff54=close[6] - close[12]
diff55=close[6] - close[11]
diff56=close[6] - close[10]
diff57=close[6] - close[9]
diff58=close[6] - close[8]
diff59=close[6] - close[7]

diff60=close[7] - close[17]
diff61=close[7] - close[16]
diff62=close[7] - close[15]
diff63=close[7] - close[14]
diff64=close[7] - close[13]
diff65=close[7] - close[12]
diff66=close[7] - close[11]
diff67=close[7] - close[10]
diff68=close[7] - close[9]
diff69=close[7] - close[8]

diff70=close[8] - close[18]
diff71=close[8] - close[17]
diff72=close[8] - close[16]
diff73=close[8] - close[15]
diff74=close[8] - close[14]
diff75=close[8] - close[13]
diff76=close[8] - close[12]
diff77=close[8] - close[11]
diff78=close[8] - close[10]
diff79=close[8] - close[9]

diff80=close[9] - close[19]
diff81=close[9] - close[18]
diff82=close[9] - close[17]
diff83=close[9] - close[16]
diff84=close[9] - close[15]
diff85=close[9] - close[14]
diff86=close[9] - close[13]
diff87=close[9] - close[12]
diff88=close[9] - close[11]
diff89=close[9] - close[10]

diff90=close[10] - close[20]
diff91=close[10] - close[19]
diff92=close[10] - close[18]
diff93=close[10] - close[17]
diff94=close[10] - close[16]
diff95=close[10] - close[15]
diff96=close[10] - close[14]
diff97=close[10] - close[13]
diff98=close[10] - close[12]
diff99=close[10] - close[11]

w=diff00+diff10+diff20+diff30+diff40+diff50+diff60+diff70+diff80+diff90
w1=diff01+diff11+diff21+diff31+diff41+diff51+diff61+diff71+diff81+diff91
w2=diff02+diff12+diff22+diff32+diff42+diff52+diff62+diff72+diff82+diff92
w3=diff03+diff13+diff23+diff33+diff43+diff53+diff63+diff73+diff83+diff93
w4=diff04+diff14+diff24+diff34+diff44+diff54+diff64+diff74+diff84+diff94
w5=diff05+diff15+diff25+diff35+diff45+diff55+diff65+diff75+diff85+diff95
w6=diff06+diff16+diff26+diff36+diff46+diff56+diff66+diff76+diff86+diff96
w7=diff07+diff17+diff27+diff37+diff47+diff57+diff67+diff77+diff87+diff97
w8=diff08+diff18+diff28+diff38+diff48+diff58+diff68+diff78+diff88+diff98
w9=diff09+diff19+diff29+diff39+diff49+diff59+diff69+diff79+diff89+diff99

p = plot(w, color=blue, style=histogram, linewidth=2, title="")
p1 = plot(w1, color=white, style=histogram, linewidth=2, title="")
p2 = plot(w2, color=green, style=histogram, linewidth=2, title="")
p3 = plot(w3, color=red, style=histogram, linewidth=2, title="")
p4 = plot(w4, color=purple, style=histogram, linewidth=2, title="")
p5 = plot(w5, color=maroon, style=histogram, linewidth=2, title="")
p6 = plot(w6, color=orange, style=histogram, linewidth=2, title="")
p7 = plot(w7, color=lime, style=histogram, linewidth=2, title="")
p8 = plot(w8, color=navy, style=histogram, linewidth=2, title="")
p9 = plot(w9, color=yellow, style=histogram, linewidth=2, title="")
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out