PDA

View Full Version : Plotting Two Indicator lines in the same panel



Edakad
05-06-2014, 05:33 AM
I have created a custom MACD indicator, Now I can't find out how to plot both the MACD line and Signal line on the same chart pane. Tried with this code but lines appear in two panes


indkey0 = addCustomIndicator (0,MACDbuffer,0,true)
MACDpanel = GetSubWindow(0,CStr(indkey0))
indkey1 = addCustomIndicator (0,signalMACDbuffer2, false ,1)Also Can you help on how to overwrite the indicator heading, it appears "Custom Indicator" in charts

Hassan-HS
05-06-2014, 07:08 AM
Hello,


you can add your custom indicator to the main panel as following


indkey0 = addCustomIndicator (0,MACDbuffer,0,false)
MACDpanel = GetSubWindow(0,CStr(indkey0))
indkey1 = addCustomIndicator (0,signalMACDbuffer2, false)


Currently you cant change the indicator name, but i will open a ticket to our development team with this issue.

Hassan-HS
05-08-2014, 08:34 AM
Dear Sir,


Also you can add them to the same sub window using this code.



indkey0 = addCustomIndicator (0,MACDbuffer,0,true,1)
indkey1 = addCustomIndicator (0,signalMACDbuffer2, false,1)