TradingView
420snoop
2016年11月2日下午4點11分

USD (basket) / XAG Spread 

Silver/U.S. DollarFXCM

描述

Hey all; I made this script for default usage on the 15 min chart for XAGUSD, try it out and tell me what you think.

It is similar to what the original user /u/MarcoValente published for his gold/silver spread script; however I have made some changes so this is usable for XAGUSD and utilizes my 'holy grail' method of basket weighting the USD (aka why the code is protected) for comparison against silver and I also made some visual enhancements like color changes, filled area of interest, and crossover markings.

One way this script can be thought of actually 'doing' is measuring the true strength of the USD against a basket vs silver. As the USD gains strength, the price per unit of silver should decrease; as the USD loses strength the price per unit of silver should increase.

The filled area is the difference between the spread and the slow MA; the marked crosses are the cross of the spread with the slow MA.

Feel free to PM me with questions etc. I find that this script is slow to load sometimes so if it doesn't immediately load try changing time frames a few times before returning to 15 min and if all else fails just wait it out haha
評論
skalp976
Dear 420snoop,
it's a fantastic tool, I like it, but I think it's repainting.
Could you help me about managing repaint issue?
If I refresh regurarly (like every min.) the webpage, then fake signal (green/red dot) will desapier.
But if after refreshing there will be remain a signal on chart, it will a correct signal, or for example 8 minutes later, when I refresh again, this 8 minutes old signal also will/could desapier (so it will be a fake signal too)?
If this 8 minutes old signal also could desapier, then could you tell me what is the higher timeframe in this indicator (which use actual candle's close price), because I think (if the higher timeframe for example 240 min.), then just the at least 240 min. old signal will be reliable, I could make a trade 4h after the signal.
Do you have any other idea about managing repainting problem?
Thanks!!!
420snoop
hello i talked to /u/glaz about a similar issue. i think the problem is that this utilizes close from a higher time frame as a source. In the version i use now i have the source set to OLHC4 and i believe this has resolved many of the issues.Also, i wouldnt use this as a signal to enter/exit trades i would use this as a signal to find the general trend direction and use other tools like fib retracements or for entry.

the default timeframe used is 240; however i have been experimenting with using 233 (both a fib number and a prime number) instead of 240 and using 3D for higher time frames (2H,4H,D)

you could also try checking the box 'use current time frame' and experimenting with a few tome frames to see where it works best.

thanks for the feed back, i am going to keep trying to improve this and may release an update if i get more feedback :)
thegreatway
Thank you
KLYP_Investment
retesting->repainting*
420snoop
@tlzkrh1029, yeah I knew that 25 days ago ;)

The newer version I have privately now uses olhc/4 and repaints 'less' see what I said to skalp976?
KLYP_Investment
This is great great indicator i ever seen in the Tradingview. Im now testing whether it is retesting.

If you don't mind, could you please make more indicators SAME to this? (for example, USDJPY, EURUSD, AUDUSD and so on.)

I follow u, and have a nice day :)
更多