Is there anyway to do this?
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
NT8: Access delta for each tic of a volumetric range bar
Collapse
X
-
Hello saturntd,
When you use the term "Delta", what are you referring to?
In math Delta refers to amount of change.
Are you referring to the difference (or absolute difference) between the close of the current bar and the previous bar?
Are you referring to the difference between the close of the current bar and the open of the current bar?
Are you referring to the difference between the high and the low?Chelsea B.NinjaTrader Customer Service
-
Hello,
Not intending to hijack this thread, but I am interested on seeing Delta prices between Buy/Sell for each price once a 5 minute bar has closed.
I also want to see difference between buy/sell as bar is forming in real time on same 5 minute bar.
Please see screenshot attached.
Thanks
Comment
-
Hello music_p13,
Your request to display the difference between Bid/Ask for each price on Volumetric Bars is being tracked with ID #SFT-3326.
Please note it is up to the NinjaTrader Development to decide if and when a request will be implemented.
Thank you for your feedback.Chelsea B.NinjaTrader Customer Service
Comment
-
I got it working like this:
in State.Configure
...
AddDataSeries(BarsPeriodType.Tick, 1); // My second series
in OnBarUpdate()
if (BarsInProgress == 2)
{
Delta += OrderFlowCumulativeDelta(BarsArray[2], CumulativeDeltaType.BidAsk, CumulativeDeltaPeriod.Bar, 0).DeltaClose[0];
}
Delta = 0.0;
in OnRender
// do what you need to do here to display the delta
- Likes 1
Comment
-
Hello jalley, thanks for the help and your time, but I am not an expert programmer and I do not know how to use on render, I am trying to be able to choose the size of the delta in the tick of the 5 min bar to enter long or short, but I have not been able to find any sample strategy with volumetric bars to be able to guide me and do this.
Put your syntax in a simple strategy but I know that I am far from making it functional, I would like for now to be able to print the delta for each tick but I can't find how to develop that syntax.
}
else if (State == State.Configure)
{
AddDataSeries(BarsPeriodType.Tick, 1);
}
else if (State == State.DataLoaded)
{
EMA1 = EMA(Close, Convert.ToInt32(Ema14));
SetProfitTarget("", CalculationMode.Percent, Profit);
SetStopLoss("", CalculationMode.Percent, Loss, false);
}
}
protected override void OnBarUpdate()
{
if (BarsInProgress != 0)
return;
if (CurrentBars[0] < 1)
return;
if (BarsInProgress == 2)
{
Delta += OrderFlowCumulativeDelta(BarsArray[2], CumulativeDeltaType.BidAsk, CumulativeDeltaPeriod.Bar, 0).DeltaClose[0];
}
Delta = 0.0;
// Set 1
if (CrossAbove(Close, EMA1, 1))
{
EnterLong(Convert.ToInt32(DefaultQuantity), "");
Lowlong = Low[0];
Print(Convert.ToString(Times[0][0]) + @" low " + Convert.ToString(Low[0]) + @" Delta " + Convert.ToString(Delta));
}
}
Thank you for your time, I attach an image of how I would like according to that value of the delta in the tick to be able to activate my order.1 Photo
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by alifarahani, Today, 09:40 AM
|
4 responses
19 views
0 likes
|
Last Post
by alifarahani
Today, 02:41 PM
|
||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
3 responses
15 views
0 likes
|
Last Post Today, 02:41 PM | ||
Started by PhillT, Today, 02:16 PM
|
2 responses
7 views
0 likes
|
Last Post
by PhillT
Today, 02:33 PM
|
||
Started by Kaledus, Today, 01:29 PM
|
3 responses
11 views
0 likes
|
Last Post Today, 02:24 PM | ||
Started by frankthearm, Yesterday, 09:08 AM
|
14 responses
47 views
0 likes
|
Last Post Today, 02:19 PM |
Comment