RicardoSantos

[RS]Multiple Majors Currency Basket Power Oscillator V0

‎947‎ مشاهدة
99
947 7
Power oscillator to discern what currency's are stronger/weaker.
إزالة من البرامج النصية المفضلة أضف إلى البرامج النصية المفضلة
//@version=2
study(title='[RS]Multiple Majors Currency Basket Power Oscillator V0', shorttitle='P', overlay=false)
USE_TF = input(title='Use Alternative Timeframe?', type=bool, defval=false)
tf = input(title='Alternative Timeframe:', type=string, defval='D', confirm=false)

eurusd = security('EURUSD', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
eurgbp = security('EURGBP', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
eurjpy = security('EURJPY', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
euraud = security('EURAUD', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
eurcad = security('EURCAD', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
eurchf = security('EURCHF', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)

usdeur = 0 - eurusd
usdgbp = security('1/GBPUSD', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
usdjpy = security('USDJPY', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
usdaud = security('1/AUDUSD', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
usdcad = security('USDCAD', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
usdchf = security('USDCHF', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)

gbpeur = 0 - eurgbp
gbpusd = 0 - usdgbp
gbpjpy = security('GBPJPY', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
gbpaud = security('GBPAUD', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
gbpcad = security('GBPCAD', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
gbpchf = security('GBPCHF', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)

jpyeur = 0 - eurjpy
jpyusd = 0 - usdjpy
jpygbp = 0 - gbpjpy
jpyaud = security('1/AUDJPY', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
jpycad = security('1/CADJPY', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
jpychf = security('1/CHFJPY', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)

audeur = 0 - euraud
audusd = 0 - usdaud
audgbp = 0 - gbpaud
audjpy = 0 - jpyaud
audcad = security('AUDCAD', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)
audchf = security('AUDCHF', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)

cadeur = 0 - eurcad
cadusd = 0 - usdcad
cadgbp = 0 - gbpcad
cadjpy = 0 - jpycad
cadaud = 0 - audcad
cadchf = security('CADCHF', USE_TF ? tf : period, change(close) > 0 ? 1 : change(close) < 0 ? -1 : 0)

chfeur = 0 - eurchf
chfusd = 0 - usdchf
chfgbp = 0 - gbpchf
chfjpy = 0 - jpychf
chfaud = 0 - audchf
chfcad = 0 - cadchf

eur_power = eurusd + eurgbp + eurjpy + euraud + eurcad + eurchf
usd_power = usdeur + usdgbp + usdjpy + usdaud + usdcad + usdchf
gbp_power = gbpeur + gbpusd + gbpjpy + gbpaud + gbpcad + gbpchf
jpy_power = jpyeur + jpyusd + jpygbp + jpyaud + jpycad + jpychf
aud_power = audeur + audusd + audgbp + audjpy + audcad + audchf
cad_power = cadeur + cadusd + cadgbp + cadjpy + cadaud + cadchf
chf_power = chfeur + chfusd + chfgbp + chfjpy + chfaud + chfcad

plot(title='EUR', series=eur_power, color=color(black, 0), linewidth=0)
plot(title='USD', series=usd_power, color=color(maroon, 0), linewidth=0)
plot(title='GBP', series=gbp_power, color=color(navy, 0), linewidth=0)
plot(title='JPY', series=jpy_power, color=color(blue, 0), linewidth=0)
plot(title='AUD', series=aud_power, color=color(teal, 0), linewidth=0)
plot(title='CAD', series=cad_power, color=color(yellow, 0), linewidth=0)
plot(title='CHF', series=chf_power, color=color(red, 0), linewidth=0)
Awesome. Thank you.
رد
That's very helpful, if taken pair by pair
رد
Updated Version:
رد
We might as well add NZD, good work overall
رد
Bullcrazy Bullcrazy
Also could make the navy line orange and if you add any other currencies they could be dotted lines. It's late and I'm rambling.... been coding in MT4 all night
رد
this are the currency's that are considered as major's, adding other currency's is not that hard tho, so its easy to modify if anyone interested in using another pool of currency's. colors and line type can be changed from the style tab in the indicator options panel.
رد
Bullcrazy RicardoSantos
Oh I thought NZD was a major as well, and I understand the colors can be changed I'm just stating that having two blues can be confusing so I was offering a suggestion to help with the confusion of the default settings but hey it looks great overall.
completecurrencytrader.com/tools/currency-strength-indicator/
رد
الصفحة الرئيسية منصة الأسهم منصًة العملات منصّة العملات الرقمية جدول الأعمال الاقتصادي برامج تعليمية كيف نعمل مميزات الرسم البياني أسعار العضوية إحالة صديق قوانين الموقع مركز المساعدة حلول المواقع الإلكترونية والوسطاء الأدوات حلول الرسوم البيانية مكتبة الرسوم البيانية صغيرة الحجم المدوّنة والأخبار تويتر
ملف التعريف إعدادات الصفحة الشخصية الحساب وإعداد الفواتير إحالة صديق تذاكر الدعم الخاصة بي مركز المساعدة التحاليل المنشورة المتابعين تتابع رسالة خاصة المحادثة تسجيل الخروج