Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
It is one that I designed for practicing simple. If the closure of 0 is greater than the closing of the closure 1 and 2 to draw a triangle. It works but it does not always appear in the graph
the code is this. I have placed overlay in true and still fails
Thank you.
#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;
#endregion
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
[Description("Enter the description of your new custom indicator here")]
public class aaaTad : Indicator
{
#region Variables
// Wizard generated variables
// User defined variables (add any user defined variables below)
#endregion
/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Overlay = false;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
if(Close[0]>=Close[1]&& //modificacion
Close[0]>Open[1]&&
Close[0]>Close[-1]&&
Close[0]>Close[-2]&&
Close[0]>Close[-3])
DrawTriangleDown(CurrentBar.ToString(),true,0,High[0]+((TickSize*4)*2),Color.Blue);//codigo para dibujar una raya
#region NinjaScript generated code. Neither change nor remove.
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
public partial class Indicator : IndicatorBase
{
private aaaTad[] cacheaaaTad = null;
private static aaaTad checkaaaTad = new aaaTad();
/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public aaaTad aaaTad()
{
return aaaTad(Input);
}
/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public aaaTad aaaTad(Data.IDataSeries input)
{
if (cacheaaaTad != null)
for (int idx = 0; idx < cacheaaaTad.Length; idx++)
if (cacheaaaTad[idx].EqualsInput(input))
return cacheaaaTad[idx];
lock (checkaaaTad)
{
if (cacheaaaTad != null)
for (int idx = 0; idx < cacheaaaTad.Length; idx++)
if (cacheaaaTad[idx].EqualsInput(input))
return cacheaaaTad[idx];
// This namespace holds all market analyzer column definitions and is required. Do not change it.
namespace NinjaTrader.MarketAnalyzer
{
public partial class Column : ColumnBase
{
/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.aaaTad aaaTad()
{
return _indicator.aaaTad(Input);
}
/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public Indicator.aaaTad aaaTad(Data.IDataSeries input)
{
return _indicator.aaaTad(input);
}
}
}
// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
public partial class Strategy : StrategyBase
{
/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.aaaTad aaaTad()
{
return _indicator.aaaTad(Input);
}
/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public Indicator.aaaTad aaaTad(Data.IDataSeries input)
{
if (InInitialize && input == null)
throw new ArgumentException("You only can access an indicator with the default input/bar series from within the 'Initialize()' method");
It's going to be difficult for anyone to deal with unformatted code like this. You would be better off to export the indicator and attach it as an attachment to a post here, so someone can figure out what's going on.
If you're not sure how to do that, it's in Ninja Help, or you can ask here.
Bob.
When one door closes, another opens.
-- Cervantes, Don Quixote