Is this can be done ? From Where I should Start ?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
want to plot Custom Candle
Collapse
X
-
Hello svadukia,
Thanks for the post.
Please see the attached example script that sets up a CumulativeDelta indicator at the class level and then gets data from that indicator in OnBarUpdate. I also demonstrate how to get Volume data.
To change the color of a bar based on a condition, you can use BarBrushes to change the color at a specified bar index.
Below is the documentation page on the Orderflow Cumulative Delta indicator:
Please let us know if we may be of any further assistance.Attached Files
-
Originally posted by NinjaTrader_ChrisL View PostHello svadukia,
Thanks for the post.
Please see the attached example script that sets up a CumulativeDelta indicator at the class level and then gets data from that indicator in OnBarUpdate. I also demonstrate how to get Volume data.
To change the color of a bar based on a condition, you can use BarBrushes to change the color at a specified bar index.
Below is the documentation page on the Orderflow Cumulative Delta indicator:
Please let us know if we may be of any further assistance.
protected override void OnBarUpdate()
{
if(CurrentBars[0] < 1) return;
if(BarsInProgress == 0)
{
Print(Volume[0] +" Volume");
Print(MyCD.DeltaClose[0] + " DClose");
Print(MyCD.DeltaOpen[0] + " DOpen");
Print(MyCD.DeltaHigh[0] + " DHigh");
Print(MyCD.DeltaLow[0] + " DLow");
}
}
So I need to plot my condition in this box right ??
here it is my code
protected override void OnBarUpdate()
{
if(CurrentBars[0] < 1) return;
if(BarsInProgress == 0)
{
if ( (MyCD.DeltaHigh[0] - MyCDdeltaLow) >= 20000) && Volume[0] >
100000)
BarBrushes[0] = Brushes.Brown ;
CandleOutlineBrushes[0] = Brushes.Brown;
}
}
Is this right ??
Comment
-
Tried that code but getting an error as shown in the attached picture in another line of code...Originally posted by svadukia View Postprotected override void OnBarUpdate()
{
if(CurrentBars[0] < 1) return;
if(BarsInProgress == 0)
{
Print(Volume[0] +" Volume");
Print(MyCD.DeltaClose[0] + " DClose");
Print(MyCD.DeltaOpen[0] + " DOpen");
Print(MyCD.DeltaHigh[0] + " DHigh");
Print(MyCD.DeltaLow[0] + " DLow");
}
}
So I need to plot my condition in this box right ??
here it is my code
protected override void OnBarUpdate()
{
if(CurrentBars[0] < 1) return;
if(BarsInProgress == 0)
{
if ( (MyCD.DeltaHigh[0] - MyCDdeltaLow) >= 20000) && Volume[0] >
100000)
BarBrushes[0] = Brushes.Brown ;
CandleOutlineBrushes[0] = Brushes.Brown;
}
}
Is this right ??
Comment
-
Yes Define same that way.. all things are same as u gave in zip file...Originally posted by NinjaTrader_ChrisL View PostHello svadukia,
Thanks for the reply.
Did you define MyCD like so? :
I look forward to your reply.Code:public class Test : Indicator { private OrderFlowCumulativeDelta MyCD; ...
Comment
-
Hello svadukia,
Thanks for the reply.
The release notes here say that the signature for DeltaType was changed in revision 13.1.
Please make sure you are on revision 8.0.13.1 by going to Help> About.
If you are not, please update your installation with these steps:
- First, copy your license key from NinjaTrader under Help> License Key then exit NinjaTrader
- Click on the link: http://ninjatrader.com/PlatformDirect
- Enter your license key and press Submit
- Select 'NinjaTrader 8'
- Select 'Download'
- Critical: Before running the installer, ensure NinjaTrader is closed.
- Run the installer.
I look forward to hearing of your results.
Comment
-
It's Done Thanks...Originally posted by NinjaTrader_ChrisL View PostHello svadukia,
Thanks for the reply.
The release notes here say that the signature for DeltaType was changed in revision 13.1.
Please make sure you are on revision 8.0.13.1 by going to Help> About.
If you are not, please update your installation with these steps:
- First, copy your license key from NinjaTrader under Help> License Key then exit NinjaTrader
- Click on the link: http://ninjatrader.com/PlatformDirect
- Enter your license key and press Submit
- Select 'NinjaTrader 8'
- Select 'Download'
- Critical: Before running the installer, ensure NinjaTrader is closed.
- Run the installer.
I look forward to hearing of your results.
I have one another problem...want to plot only those volume which is Greater then Previous Volume
SO I did this...
protected override void OnBarUpdate()
{
if (Volume[0] >= Volume[1])
{
Value[0] = Volume[0] ;
}
else
{
Value.Reset();
}
}
But it is plotting nothing
Comment
-
It's Done though had to add,Originally posted by NinjaTrader_ChrisL View PostHello svadukia,
Thanks for the reply.
I am able to plot this in my attempt. Please see the attached example and let me know if you do not see the plot.
If ( CurrentBar < 1) return;
otherwise, it was not plotting.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
650 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
577 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment