Menu
Brokers
MT4 Forex Brokers
MT5 Forex brokers
PayPal Brokers
Skrill Brokers
Oil Trading Brokers
Gold Trading Brokers
Web Browser Platform
Brokers with CFD Trading
ECN Brokers
Bitcoin FX Brokers
PAMM Forex Brokers
With Cent Accounts
With High Leverage
Cryptocurrency Brokers
Forums
All threads
New threads
New posts
Trending
Search forums
What's new
New threads
New posts
Latest activity
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Reply to thread
Forums
Trading Platforms
MetaTrader 4
MQ4 Code Works
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
[QUOTE="TradeChaser, post: 204899, member: 66787"] Speaking of the devil... This may be too much, but will be my first project. It is an amalgamation of all of the WPR rankings across all pairs. If you select just those pairs that cross over a chart, perhaps it gives a hint of what is to come. Of course, I have not forward traded this, and as you can see, it appears to be some signals that create chop. But with the correct filter, maybe those can be avoided also. [ATTACH type="full"]20277[/ATTACH] [automerge]1645204399[/automerge] You will see why I enjoy Thinkscript in learning to code indicators lol. Below is the thinkscript for the above. It is very intuitive, and should read like a Pseudo Code for what I will try to create. Basically, it iterates all of the WPRs of each pair, and averages them. Then it ranks by strength. However, like the image above, you can choose to just show the plots for the pair on screen to show where the shifts in momentum can happen. [CODE]declare lower; def len1 = 7; def timeframe = AggregationPeriod.day; def GBP1 = (close("GBP/USD", period = timeframe) - Highest(high("GBP/USD", period = timeframe), len1)) / ((Highest(high("GBP/USD", period = timeframe), len1)) - Lowest(low("GBP/USD", period = timeframe), len1))*100; def GBP2 = (close("GBP/JPY", period = timeframe) - Highest(high("GBP/JPY", period = timeframe), len1)) / ((Highest(high("GBP/JPY", period = timeframe), len1)) - Lowest(low("GBP/JPY", period = timeframe), len1))*100; def GBP3 = (close("GBP/CAD", period = timeframe) - Highest(high("GBP/CAD", period = timeframe), len1)) / ((Highest(high("GBP/CAD", period = timeframe), len1)) - Lowest(low("GBP/CAD", period = timeframe), len1))*100; def GBP4 = (close("GBP/AUD", period = timeframe) - Highest(high("GBP/AUD", period = timeframe), len1)) / ((Highest(high("GBP/AUD", period = timeframe), len1)) - Lowest(low("GBP/AUD", period = timeframe), len1))*100; def GBP5 = -100 - ((Highest(high("EUR/GBP", period = timeframe), len1) - close("EUR/GBP", period = timeframe)) / (Lowest(low("EUR/GBP", period = timeframe), len1) - Highest(high("EUR/GBP", period = timeframe), len1))) * 100; plot gbp_avg = (GBP1 + GBP2 + GBP3 + GBP4 + GBP5) / 5; gbp_avg.AssignValueColor(color.Blue); addlabel(yes, CONCAT("GBP", concat(" ", gbp_avg)), color.Blue); def eur1 = (Highest(high("EUR/USD", period = timeframe)) - close("EUR/USD", period = timeframe)) / (Highest(high("EUR/USD", period = timeframe)) - Lowest(low("EUR/USD", period = timeframe), len1)) * (-100); def EUR2 = (Highest(high("EUR/JPY", period = timeframe), len1) - close("EUR/JPY", period = timeframe)) / ((Highest(high("EUR/JPY", period = timeframe), len1)) - Lowest(low("EUR/JPY", period = timeframe), len1))*(-100); def EUR3 = (Highest(high("EUR/CAD", period = timeframe), len1) - close("EUR/CAD", period = timeframe)) / ((Highest(high("EUR/CAD", period = timeframe), len1)) - Lowest(low("EUR/CAD", period = timeframe), len1))*(-100); def EUR4 = (Highest(high("EUR/AUD", period = timeframe), len1) - close("EUR/AUD", period = timeframe)) / ((Highest(high("EUR/AUD", period = timeframe), len1)) - Lowest(low("EUR/AUD", period = timeframe), len1))*(-100); def EUR5 = (Highest(high("EUR/GBP", period = timeframe), len1) - close("EUR/GBP", period = timeframe)) / ((Highest(high("EUR/GBP", period = timeframe), len1)) - Lowest(low("EUR/GBP", period = timeframe), len1)) * (-100); plot eur_avg = (eur1 + eur2 + eur3 + eur4 + eur5) / 5; eur_avg.AssignValueColor(color.green); addlabel(yes, CONCAT("EUR", concat(" ", eur_avg)), color.green); def usd1 = -100 + ((close("EUR/USD", period = timeframe) - Highest(high("EUR/USD", period = timeframe), len1)) / (Lowest(low("EUR/USD", period = timeframe), len1) - (Highest(high("EUR/USD", period = timeframe), len1)))*100); def usd2 = (close("USD/JPY", period = timeframe) - Highest(high("USD/JPY", period = timeframe), len1)) / ((Highest(high("USD/JPY", period = timeframe), len1)) - Lowest(low("USD/JPY", period = timeframe), len1))*100; def usd3 = (close("USD/CAD", period = timeframe) - Highest(high("USD/CAD", period = timeframe), len1)) / ((Highest(high("USD/CAD", period = timeframe), len1)) - Lowest(low("USD/CAD", period = timeframe), len1))*100; def usd4 = -100 + (close("AUD/USD", period = timeframe) - Highest(high("AUD/USD", period = timeframe), len1)) / (Lowest(low("AUD/USD", period = timeframe), len1) - (Highest(high("AUD/USD", period = timeframe), len1)))*100; def usd5 = -100 + (((close("GBP/USD", period = timeframe) -((Highest(high("GBP/USD", period = timeframe), len1)))) / (Lowest(low("GBP/USD", period = timeframe), len1) - (Highest(high("GBP/USD", period = timeframe), len1)))) * 100); plot usd_avg = (usd1 + usd2 + usd3 + usd4 + usd5) / 5; usd_avg.AssignValueColor(color.red); addlabel(yes, CONCAT("USD", concat(" ", usd_avg)), color.red); def aud1 = (close("AUD/USD", period = timeframe) - Highest(high("AUD/USD", period = timeframe), len1)) / ((Highest(high("AUD/USD", period = timeframe), len1)) - Lowest(low("AUD/USD", period = timeframe), len1))*100; def aud2 = (close("AUD/JPY", period = timeframe) - Highest(high("AUD/JPY", period = timeframe), len1)) / ((Highest(high("AUD/JPY", period = timeframe), len1)) - Lowest(low("AUD/JPY", period = timeframe), len1))*100; def aud3 = (close("AUD/CAD", period = timeframe) - Highest(high("AUD/CAD", period = timeframe), len1)) / ((Highest(high("AUD/CAD", period = timeframe), len1)) - Lowest(low("AUD/CAD", period = timeframe), len1))*100; def aud4 = -100 + (((Highest(high("EUR/AUD", period = timeframe), len1))) - close("EUR/AUD", period = timeframe)) / (Lowest(low("EUR/AUD", period = timeframe), len1) - (Highest(high("EUR/AUD", period = timeframe), len1))) * (-100); def aud5 =-100 + (((Highest(high("GBP/AUD", period = timeframe), len1))) - close("GBP/AUD", period = timeframe)) / (Lowest(low("GBP/AUD", period = timeframe), len1) - (Highest(high("GBP/AUD", period = timeframe), len1))) * (-100); plot aud_avg = (aud1 + aud2 + aud3 + aud4 + aud5) / 5; aud_avg.AssignValueColor(color.PLUM); addlabel(yes, CONCAT("AUD", concat(" ", aud_avg)), color.plum); def cad1 = -100 + (((Highest(high("GBP/CAD", period = timeframe), len1))) - close("GBP/CAD", period = timeframe)) / (Lowest(low("GBP/CAD", period = timeframe), len1) - (Highest(high("GBP/CAD", period = timeframe), len1))) * (-100); def cad2 = (close("CAD/JPY", period = timeframe) - Highest(high("CAD/JPY", period = timeframe), len1)) / ((Highest(high("CAD/JPY", period = timeframe), len1)) - Lowest(low("CAD/JPY", period = timeframe), len1))*100; def cad3 = -100 + (((Highest(high("AUD/CAD", period = timeframe), len1))) - close("AUD/CAD", period = timeframe)) / (Lowest(low("AUD/CAD", period = timeframe), len1) - (Highest(high("AUD/CAD", period = timeframe), len1))) * (-100); def cad4 = -100 + (((Highest(high("EUR/CAD", period = timeframe), len1))) - close("EUR/CAD", period = timeframe)) / (Lowest(low("EUR/CAD", period = timeframe), len1) - (Highest(high("EUR/CAD", period = timeframe), len1))) * (-100); def cad5 =-100 + (((Highest(high("USD/CAD", period = timeframe), len1))) - close("USD/CAD", period = timeframe)) / (Lowest(low("USD/CAD", period = timeframe), len1) - (Highest(high("USD/CAD", period = timeframe), len1))) * (-100); plot cad_avg = (cad1 + cad2 + cad3 + cad4 + cad5) / 5; cad_avg.AssignValueColor(color.daRK_ORANGE); addlabel(yes, CONCAT("CAD", concat(" ", cad_avg)), color.darK_ORANGE); def jpy1 = -100 + (((Highest(high("GBP/JPY", period = timeframe), len1))) - close("GBP/JPY", period = timeframe)) / (Lowest(low("GBP/JPY", period = timeframe), len1) - (Highest(high("GBP/JPY", period = timeframe), len1))) * (-100); def jpy2 = -100 + (((Highest(high("USD/JPY", period = timeframe), len1))) - close("USD/JPY", period = timeframe)) / (Lowest(low("USD/JPY", period = timeframe), len1) - (Highest(high("USD/JPY", period = timeframe), len1))) * (-100); def jpy3 = -100 + (((Highest(high("AUD/JPY", period = timeframe), len1))) - close("AUD/JPY", period = timeframe)) / (Lowest(low("AUD/JPY", period = timeframe), len1) - (Highest(high("AUD/JPY", period = timeframe), len1))) * (-100); def jpy4 = -100 + (((Highest(high("EUR/JPY", period = timeframe), len1))) - close("EUR/JPY", period = timeframe)) / (Lowest(low("EUR/JPY", period = timeframe), len1) - (Highest(high("EUR/JPY", period = timeframe), len1))) * (-100); def jpy5 = -100 + (((Highest(high("CAD/JPY", period = timeframe), len1))) - close("CAD/JPY", period = timeframe)) / (Lowest(low("CAD/JPY", period = timeframe), len1) - (Highest(high("CAD/JPY", period = timeframe), len1))) * (-100); plot jpy_avg = (jpy1 + jpy2 + jpy3 + jpy4 + jpy5) / 5; jpy_avg.AssignValueColor(color.YELLOW); addlabel(yes, CONCAT("JPY", concat(" ", jpy_avg)), color.YELLOW);[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Top
Bottom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…