I've been trying to set up a line chart with multiple symbols. There are no errors untill the 5th and 6th SetForeign is written, The code flashes warning 512, Is there a way for me to set this right?
Instead you should run analysis scan to add up prices.
Move symbols to a watchlist then run scan over that watchlist with pad & align being enabled in analysis settings general tab.
if (Status("action") == actionScan) {
// Run in Analysis - Scan over filtered watchlist
if( InWatchList( GetOption("FilterIncludeWatchlist") ) ) {
if(Status("stocknum") == 0)
StaticVarRemove("~NiftyOptionsSum*");
StaticVarAdd("~NiftyOptionsSum", Close);
}
}
//Plot result of analysis
Sum_options = StaticVarGet("~NiftyOptionsSum");
Plot( Sum_options, "~NiftyOptionsSum", colorRed );
Thank you Tomasz, I am still unable to plot the Bollinger band to Close of sum totals of all symbols , in my case its "Plot(ST,"Test",colorRed,styleLine);" where ST is sum total of all symbols. Thanks again .