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
Super Stock Screener Ranking System

How-to Lessons
How to download a trading item from the Sharing Server
How to print a chart
How to improve the performance of QuantShare databases?
How to get trading orders from a portfolio programmatically
How to download historical quotes of indices

Related Forum Threads
BUG? Cannot type in some symbols names when using Hide Buttons.
Gui bug?
trend line stick to high and low
Staggered Exit
Historical intraday data limited on chart

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









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 © 2024 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.