Is it possible to combine two studies in the same code if one study is on the price payne and the second is below it? If so, how am i getting this result?
Announcement
Collapse
No announcement yet.
Problem in combining in code?
Collapse
X
-
fflaque
You can in theory combine the two studies but you may end up with compressed price and/or indicator plots due to differences in the scales.
As to the result you are showing that is because in preMain() you omitted to assign the settings of the Oscillator to the appropriate element of the returned array.
Replace lines 31 to 34 with the following
setCursorLabelName("Osc",2);
setDefaultBarFgColor(Color.blue,2);
setDefaultBarThickness(1,2);
setPlotType(PLOTTYPE_HISTOGRAM,2);
Here below the result for the same symbol/interval as in the image you posted
Alex
.
Comment
Comment