Is this can be done ? From Where I should Start ?
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
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 FilesChris L.NinjaTrader Customer Service
-
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
-
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
-
Originally posted by NinjaTrader_ChrisL View PostHello svadukia,
Thanks for the reply.
Did you define MyCD like so? :
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.Chris L.NinjaTrader Customer Service
Comment
-
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
-
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 judysamnt7, 03-13-2023, 09:11 AM
|
4 responses
57 views
0 likes
|
Last Post
by DynamicTest
Today, 08:25 PM
|
||
Started by ScottWalsh, Today, 06:52 PM
|
4 responses
36 views
0 likes
|
Last Post
by ScottWalsh
Today, 07:40 PM
|
||
Started by olisav57, Today, 07:39 PM
|
0 responses
7 views
0 likes
|
Last Post
by olisav57
Today, 07:39 PM
|
||
Started by trilliantrader, Today, 03:01 PM
|
2 responses
19 views
0 likes
|
Last Post
by helpwanted
Today, 07:25 PM
|
||
Started by cre8able, Today, 07:24 PM
|
0 responses
9 views
0 likes
|
Last Post
by cre8able
Today, 07:24 PM
|
Comment