ara1
September 26, 2020, 7:13am
1
Using Windows 10, 64 bit, AB 6.35.1
I tried to plot same price array as a line and bar graph. Two issues:
The resulting plots look very different though values from both plots are the same.
Bar graph is green even though it is supposed to be black
Code below
Index = Foreign("$SPX","C");
//
Plot(Index,"",colorBlack,styleThick);
Plot(Index,"",colorBlack,styleThick|styleBar|styleownscale);
fxshrat
September 26, 2020, 10:09am
2
Simple.
You retrieve only CLOSE price via Foreign in your code!
Plot
() and styleBar
will plot Open, High, Low and Close data bars but you have not retrieved O, H, L from Foreign symbol. So Open, High and Low are from selected symbol ("BA"
).
Solution:
Use PlotForeign () function
PlotForeign("$SPX", "S&P500", colorBlack, styleBar);
1 Like
system
Closed
January 4, 2021, 10:10am
3
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.