♥ 0 |
Mr. Hahn: I’ve been working with /NQ Futures and I like to also watch /ES charts at the same time. I am working with TOS. Is it possible to add a line of code to my example that would change the color of my label as the current price fluctuates. In other words If the value goes up the label turns Green and if value goes down the label turns red. I am presently using a 2 and a 5 minute candle chart. There are a few stocks that correlate closely with each of these future products that I like to watch without keeping a watch list on the screen. The thought is by seeing changes in correlating products might give a sign of what may be coming before the future product responds. Thanks for your assistance. input SYMB = “RUT”; def AD = close (symbol = SYMB); AddLabel(1, “RUT: ” + ” = ” + AD, if Close < Last price value then Color.RED else Color.GREEN); RESOLVED
Marked as spam
|
Please log in to post questions.
You should be able to do that by changing this line:
def AD = close (symbol = SYMB);
to this:
def AD = close (symbol = SYMB, period = AggregationPeriod.DAY) – close(symbol = SYMB, period = AggregationPeriod.DAY)[1];
That is current daily close minus previous daily close.
Thank you again! Wow. Have to get my kids to learn this.