Indicator bug? or Im doing it wrong?
Hi FTO,
Is it possible to put any object like rectangle on separate window (this.api.SetOutputWindow(TOutputWindow.SEPARATE_WINDOW))? I'm trying to put a rectangle and a text but I don't see anything.
test-indicator.js.txt
19.7 KB• Text
- How does this impact your experience?
Comments9
Diana Zhoshko
Aug 3
If you use the oscillator indicator, the right point is:
// 0 = MainChart, 1+ = OscWins
const window = this.api.GetCurrentWindowIndex()
this.api.CreateChartObject(
'MyLine',
TObjectType.TREND_LINE,
window,
time1,
price1,
time2,
price2,
undefined,
undefined,
true
)
Carl D
Aug 3
I still dont see any object when using that
Carl D
Aug 3
I think the problem is setting the price1 and price2. Even if I set these different price, I still get the same value when logging it using
this.api.GetObjectProperty(_name, ObjProp.OBJPROP_PRICE1)Diana Zhoshko
Aug 4
Hi Carl,
Could you please send us the freshest file? That way we’ll be able to see the full picture and check the issue properly.
Carl D
Aug 4
Hi,
Have u tried to run my previous file?
Anyway, here’s the new one. I just put a console log
test-indicator.js.txt
19.5 KB• Text
Diana Zhoshko
Aug 4
Thanks a lot! The developer told you created a completely empty oscillator and then draws objects there.
Because there’s no buffer, the oscillator has nothing to rely on (no values), so the objects are drawn outside the oscillator window. A temporary workaround is to add any buffer (even an invisible one).
index.ts1
2.6 KB
Carl D
Aug 4
Oh that’s why!
Confirmed the temporary workaround is working.
Thank you!
Diana Zhoshko
Aug 4
Amazing!😃 Glad we could help
Diana Zhoshko
Aug 3
Hi @Carl D,
I am clarifying this with the developers.Will get back to you asap