Login
Remember
Register
AmiBroker Q&A
Questions
Hot!
Unanswered
Tags
Categories
Users
Ask a Question
Ask a Question
How to workaround 500 Plot() calls limit? (Warning 502)
0
votes
asked
May 23, 2017
in
AmiBroker
by
admin
(
9,260
points)
I am getting Warning 502, which says "You are calling Plot()/PlotOHLC() function over 500 times, it is highly inefficient. Reduce number of calls." but I need to draw Price trendline between Buy/Sell signals and need to call Plot() many times.
afl
Your answer
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or
register
.
1 Answer
0
votes
answered
May 23, 2017
by
admin
(
9,260
points)
Best answer
If you are calling Plot() more than 500 times it means that you are doing something wrong. Typical example is when users try to plot hundreds of line segments.
They call Plot() many times while this can be done using single Plot() call as shown here:
http://www.amibroker.org/userkb/2007/04/20/plotting-trade-zigzag-lines/
commented
May 23, 2017
by
bigalgator
I also would like to be able to plot more series. These are not individual segments, but complete trendlines. A modern PC with a high resolution display can readily render more than 500. Perhaps a registry setting to unlock the restriction, like with RequestTimedRefresh, would be handy.
commented
May 24, 2017
by
admin
(
9,260
points)
Yes I understand, but still you can draw complete trendlines using technique presented in the article. Also instead of Plot() which is designed to draw array-based data, you may consider using GfxLineTo which is strictly designed to draw a line with very low resource consumption (faster than Plot) and without the limit on number of calls
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or
register
.
Welcome to AmiBroker Q&A. Please note that we are moving totally to the Community Forum
forum.amibroker.com
any new questions should go there.
All categories
AmiBroker
(98)
AmiQuote
(41)
AFL Code Wizard
(14)
IBController
(2)
Data sources
(14)
Plugins
(2)
Testing
(6)
Related questions
How do we plot a graph in chart area and plot a line in a panel below it using one AFL script ?
how to make spread by point ( spread = buyprice - 0.5)
How to export customized CSV file(walk-fowarding)?
How to run SetBacktestMode( backtestRotational ) for short trades instead of long ones?
Non exploration XYCHART XYSCATTER Plot ?
Most popular tags
afl
amibroker
amiquote
data
yahoo
backtest
bid-ask
plot
optimize
days
volume
ib
setup
debugger
website
account
database
eod
tiingo
amibroker-migration
collection
documentation
monte-carlo
per-signal-metric
non-trading
linux-mint
day-trading
simulation
papermoney
scatter
websites
research
marketwatch
filters
#import
#utf8
internet-explorer
ie10
rotational
issue
dividends
spread
crossorders
trading
dividend
custom
name
volumedelta
downtick
uptick
backfill
posts
symbology
installation
tc2000
multi-time-frame
android
linking
charts
ask
multi-threading
email
forum
ascii
import
apple
full
user-interface
...