Alicante.Spain
Experience: Intermediate
Platform: Ninja Trader
Trading: FDAX, NQ
Posts: 2 since Feb 2012
Thanks Given: 3
Thanks Received: 0
|
Good afternoon, I will see an indicator that works perfectly and does almost what I ask but it does the other way around, I want to explain.
It is an indicator that draws 2 lines, a line is at the opening price and one at the current price, moving up or down depending on the same price movement.
The question is very basic, I got that I do but right price and what I want is that these colored lines are placed LEFT price and these lines can change their parameters so that they are brought up to 20 candles behind price, 30, 50, etc etc, that's changed the parameters of the indicator. And this is what it takes me hours and I can not do it. Please ask for help sure is a little silly. In short is that exit right instead of the left of the price.
Besides these 2 lines go on the left of the price I would also like clicking on these lines to modify the parameters indicator open and now does not work properly.
I have added the code indicator.
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 BbFranLine : Indicator
{
#region Variables
// Wizard generated variables
private double disTicks = 5; // Default setting for DistClose
private int barrAtras = -41; // Default setting for BarrAtras
private int barrDel = -70; // Default setting for BarrAtras
// 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()
{
CalculateOnBarClose = false;
Overlay = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
RemoveDrawObjects();
double cierre=Close[0];
double apertura=Open[0];
DrawLine("Inf", true,barrAtras,cierre ,barrDel,cierre,Color.Violet,DashStyle.Solid,7);
DrawLine("Sup", true,barrAtras,apertura ,barrDel,apertura,Color.Black,DashStyle.Solid,7);
}
#region Properties
[Description("")]
[GridCategory("Parameters")]
public double DisTicks
{
get { return disTicks; }
set { disTicks = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int BarrAtras
{
get { return barrAtras; }
set { barrAtras = Math.Max(-100, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int BarrDel
{
get { return barrDel; }
set { barrDel = Math.Max(-100, value); }
}
#endregion
}
}
Thanks in advance.
MarianoRA
|