Click here to Login





                                                   ChartSmoothLine is immune to UpdateColor. Design choice or bug?

  1

0
Josh McCormick
2020-08-09 12:19:28


QUESTION:
==========
I might have missed it, but I didn't see it documented anywhere. And it doesn't logically make sense.
It appears in my testing that ChartSmoothLine always reacts to UpdateColor, first argument true or not.
Is this a bug? Or am I overlooking some documentation?

It was with some frustration that I spent time debugging why this simple plot wasn't coloring correctly.
The ema5 line was always purple, which made absolutely no sense.
=======================================================================
ema5=ema(5);
ema13=ema(13);
Plot (ema13,"EMA13",ColorBlue,ChartSmoothLine,StyleWidth3);
Plot (ema5,"EMA5",ColorLightBlue,ChartSmoothLine,StyleWidth3);
UpdateColor (ema5<ema13,colorPurple);

After I replaced ChartSmoothLine with ChartLine, the script plotted as expected.
Ema5 was light blue above Ema13 and switched to purple below Ema13:
========================================================
ema5=ema(5);
ema13=ema(13);
Plot (ema13,"EMA13",ColorBlue,ChartLine,StyleWidth3);
Plot (ema5,"EMA5",ColorLightBlue,ChartLine,StyleWidth3);
UpdateColor (ema5<ema13,colorPurple);

Thanks as always,
Josh McCormick



QuantShare
2020-08-09 18:02:15

  1

Best Answer
Yes, you are right. We need to check this.


No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Design and backtest a trading system with two strategies
Trading rules using the VIX Index
Sector Surfer AMM Model
Historical Data of CAPS Ratings
RefString

How-to Lessons
How to print a chart
How to download a trading item from the Sharing Server
How to create a correlation matrix of several securities
How to plot arrows below/above candlesticks on a chart
How to use a custom drawing tool

Related Forum Threads
BUG? Cannot type in some symbols names when using Hide Buttons.
Gui bug?
Y Axis Modification required
Downloader will not allow more than 1 thread
Regarding crossover function in case of realtime QS

Blog Posts
Creating a download item: Initial Jobless Claims
How to Create a List of Ticker Symbols
Trading System: Buy stocks with the highest Sharpe ratio
Create a HTML or PDF Report of your Trading System Backtesting Re...
Correlation Between Multiple Trading Systems









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright 2023 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.