View Full Version : BarsUp/BarsDown Indicators
bob5e
03-07-2009, 09:39 PM
Regarding the "BarsUp/BarsDown" indicators, I was wondering is there an easy way to have those print as a dot above and below the bars on the price chart rather than a default separate indicator(s)?
I have tried using different plot commands but I'm not having much luck. Thanks!
NinjaTrader_Ray
03-08-2009, 07:51 AM
Create a new custom indicator that checks the BarsUp/BarsDown indicators for a true condition, then call the DrawDot() method to draw the dot. Make sure you have
Overlay = true;
In initialize so a new indicator panel will not be created.
bob5e
03-08-2009, 08:34 AM
Ray, thanks for the info . . I'll try what you recommended.
bob5e
03-11-2009, 12:14 AM
Ray, I tried what you recommended but it's still not compiling correctly. Could you please tell me what I'm doing wrong . . Thanks!
/// This method is used to configure the indicator and is called once before any bar data is loaded.
///</summary>
protectedoverridevoid Initialize()
{
Add (DrawDot("tag1", true, 0, Low[0] - TickSize, Color.Red));
CalculateOnBarClose = true;
Overlay = true;
}
NinjaTrader_Bertrand
03-11-2009, 05:00 AM
Unfortunately I'm not familiar with the BarsUp/Dn indicators, but here's an idea how to plot a blue dot below the Low of the bar when a bar with an Up close was found -
protectedoverridevoid OnBarUpdate()
{
if (Close[0] > Open[0])
DrawDot(CurrentBar.ToString(), true, 0, Low[0] - TickSize, Color.Blue);
}
bob5e
03-31-2009, 09:43 PM
Thanks Bertrand and Ray. Never got this to work. Obviously, NT programming is beyond me. This only took a fraction of the coding in Tradestation for me. Like other folks said regarding NT . . one needs to be a programmer first, then a trader. I guess I'll just live with it in a separate panel. Thanks for trying . .
NinjaTrader_Bertrand
04-01-2009, 04:22 AM
You are welcome, you could also take a look at our strategy wizard and use this to generate the needed code with a point and click approach - http://www.ninjatrader-support.com/HelpGuideV6/WizardScreens.html
You don't have to issue entry / exit orders, just use it to place your dot(s) when then conditions become true.