HELP!!
I am interested in incorporating TRIN, TRINQ and TICK as indicators displayed below the price data in an advanced chart, and am having some trouble.
First, I have written a simple TRIN & TRINQ combined indicator, which should show up near each other on the same indicator pane. However, for some reason I can't fathom, the pane comes up blank. Any help with fixing this would be greatly appreciated.
Here's the efs:
function preMain()
{
setStudyTitle("Trin & TrinQ");
setCursorLabelName("TRIN & TRINQ");
setPlotType(PLOTTYPE_LINE, 0);
setPlotType(PLOTTYPE_LINE, 1);
setDefaultBarFgColor(Color.blue,0);
setDefaultBarFgColor(Color.red,1);
}
function main()
{
var vTrin = close(0, 1, "$trin");
if (vTrin == null) vTrin = 0;
var vTrinq = close(0, 1, "$trinq");
if (vTrinq == null) vTrinq = 0;
// debugPrint("trin=" + vTrin + ", trinq=" + vTrinq +"\n");
return new Array(vTrin, vTrinq);
}
I also have a TICK indicator, which works as is. But what I'd really like is to see the all the TICK data for the current bar (OHLC), not just the close, and I'd like to see it in candlestick format. (Actually this could be any ticker, not just TICK. For example, it would be useful to see a candlestick of $SPX under the candlestick chart for an individual stock, etc.)
Here's the efs for TICK:
function preMain()
{
setStudyTitle("Tick");
setCursorLabelName("TICK",0);
setDefaultBarFgColor(Color.darkgreen,0);
addBand( 1000, PS_SOLID, 1, Color.purple);
addBand(-1000, PS_SOLID, 1, Color.purple);
}
function main()
{
/* Instead of returning just the close, is it possible to return
OHLC and display it in candlestick form?
*/
return close(0, 1, "$tick");
}
Thanks,
Mikey
I am interested in incorporating TRIN, TRINQ and TICK as indicators displayed below the price data in an advanced chart, and am having some trouble.
First, I have written a simple TRIN & TRINQ combined indicator, which should show up near each other on the same indicator pane. However, for some reason I can't fathom, the pane comes up blank. Any help with fixing this would be greatly appreciated.
Here's the efs:
function preMain()
{
setStudyTitle("Trin & TrinQ");
setCursorLabelName("TRIN & TRINQ");
setPlotType(PLOTTYPE_LINE, 0);
setPlotType(PLOTTYPE_LINE, 1);
setDefaultBarFgColor(Color.blue,0);
setDefaultBarFgColor(Color.red,1);
}
function main()
{
var vTrin = close(0, 1, "$trin");
if (vTrin == null) vTrin = 0;
var vTrinq = close(0, 1, "$trinq");
if (vTrinq == null) vTrinq = 0;
// debugPrint("trin=" + vTrin + ", trinq=" + vTrinq +"\n");
return new Array(vTrin, vTrinq);
}
I also have a TICK indicator, which works as is. But what I'd really like is to see the all the TICK data for the current bar (OHLC), not just the close, and I'd like to see it in candlestick format. (Actually this could be any ticker, not just TICK. For example, it would be useful to see a candlestick of $SPX under the candlestick chart for an individual stock, etc.)
Here's the efs for TICK:
function preMain()
{
setStudyTitle("Tick");
setCursorLabelName("TICK",0);
setDefaultBarFgColor(Color.darkgreen,0);
addBand( 1000, PS_SOLID, 1, Color.purple);
addBand(-1000, PS_SOLID, 1, Color.purple);
}
function main()
{
/* Instead of returning just the close, is it possible to return
OHLC and display it in candlestick form?
*/
return close(0, 1, "$tick");
}
Thanks,
Mikey
Comment