Please, excuse me for my English.
It's possible to create a NinjaScript that display a floating window like Data Box?
If it's not possible, it's possible to create a floating Box (rectangle) with drag and drop caabilities?
Or How to display data in Data Box without drawing these on the chart? For example, the Range of the current bar.
This is an indicator of Position Size and I need to display in the Data Box the EntryPoint, Stop, StopSize, Risk, and Number of contratcts. All this data is already display on the upper left corner of the chart and my Idea is to display this data in the Data Box instead on the upper left corner of the chart.
I use the Value.Set(Ent) and the entry is displayed into the Data Box, but I don't know how to display several data.
Here is the code snippet:
protected override void Initialize()
{
Add(new Plot(new Pen(Color.DarkGreen,2), PlotStyle.Line, "Range"));
Add(new Plot(new Pen(Color.DarkGreen,2), PlotStyle.Line, "Entry"));
Overlay = true;
CalculateOnBarClose = false;
DisplayInDataBox = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
MaxRiskPerTrade = Math.Round(capital * maxDayRiskPercent / 100 / numTradesPerDay, 2);
Max = High[0];
Min = Low[0];
Rng = Mx-Mn;
Ent = Max + TickSize;
Stp = Min - TickSize;
tStp = Rng + (2 * TickSize);
RiskFor1c = (tStp / TickSize* valueTick) + commission;
Value.Set(Rng); // Values[0].Set(Rng)
Value.Set(Ent); // Values[0].Set(Ent)
}
The Value.Set only work with one data, the last, and when I use Values[0] and Values[1] the data is showed in Data Box but the chart is see like the attached image.
Thank you.
Thank you.
Comment