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
DrawingObject Index
Collapse
X
-
Thank you, s.kinra.
I think I looked at these before. I was looking for a way to have a User Input for the size. I think these are a template drawn on the chart only. I could be wrong that is for sure. LOL
So, to add a User Input for the size is not available?
Thanks again for everything.
James
Comment
-
Hello James,
There are many questions here, and the topic is reaching several pages in length.
We ask that new inquiries are created as new threads. This helps keep the forum organized so others browsing can find solutions and also helps our support staff in case a technician is out of the office and another technician needs to step in.
Please see the description on the User App Share page for ChartMarlersPlus as it tells you how to use the modified Drawing Tools with NinjaScript. You can use intelliprompt in the NinjaScript Editor to get further hints on how to use the modified Drawing tools in code.
Intelliprompt - https://ninjatrader.com/support/help...elliprompt.htm
As an example script:
Code:namespace NinjaTrader.NinjaScript.Indicators { public class TestChartMarkersPlus: Indicator { protected override void OnStateChange() { if (State == State.SetDefaults) { Name = "TestChartMarkersPlus"; IsOverlay = true; Size = 100; } } protected override void OnBarUpdate() { DrawPlus.Dotp(this, "tag", true, 0, High[0] + 10 * TickSize, Brushes.White, (float)Size, Brushes.Black); } #region Properties [NinjaScriptProperty] [Range(1, int.MaxValue)] [Display(Name="Size", Order=1, GroupName="Parameters")] public int Size { get; set; } #endregion } }
Please open a new thread if you have any new inquires.JimNinjaTrader Customer Service
Comment
-
Originally posted by s.kinra View PostHello Tony,
I use this similar to Current Bar which concatenate the Bar index & this does the price, so basically for every new High I have a new tag & when I call remove based on condition it retains the latest high. However, I don't use them very frequently but things are working for me so far. I don't know your exact issue & that's why I said something seems to be missing, I would suggest you to try removing the draw object in a new indicator with the logic & then you can include it in main code so it keeps things simple & easy for you to understand the behavior. This is how I get the things working for me & I am sure your things would be much more complex. I just try to keep it as simple as I can.
Comment
-
Hello Dereck39,
There shouldn't be any issues while concatenating bar index & price but it all depends on your needs. The basic idea is to have a unique tag name for each drawing object. I personally prefer counter or bar index with a static string so I can easily identify the object type & still have unique names. Now what exactly you need & where you're getting stuck would need to look into to have a tag name best suited for your requirements. Hope it helps!
Comment
-
Originally posted by NinjaTrader_Jim View PostHello James,
There are many questions here, and the topic is reaching several pages in length.
We ask that new inquiries are created as new threads. This helps keep the forum organized so others browsing can find solutions and also helps our support staff in case a technician is out of the office and another technician needs to step in.
Please see the description on the User App Share page for ChartMarlersPlus as it tells you how to use the modified Drawing Tools with NinjaScript. You can use intelliprompt in the NinjaScript Editor to get further hints on how to use the modified Drawing tools in code.
Intelliprompt - https://ninjatrader.com/support/help...elliprompt.htm
As an example script:
Code:namespace NinjaTrader.NinjaScript.Indicators { public class TestChartMarkersPlus: Indicator { protected override void OnStateChange() { if (State == State.SetDefaults) { Name = "TestChartMarkersPlus"; IsOverlay = true; Size = 100; } } protected override void OnBarUpdate() { DrawPlus.Dotp(this, "tag", true, 0, High[0] + 10 * TickSize, Brushes.White, (float)Size, Brushes.Black); } #region Properties [NinjaScriptProperty] [Range(1, int.MaxValue)] [Display(Name="Size", Order=1, GroupName="Parameters")] public int Size { get; set; } #endregion } }
Please open a new thread if you have any new inquires.
Happy Holiday.
I have been working again on this project and have a question.
I'm trying to set the size of the ChartMarkerPlus objects and that is good.
I need to have the objects shrink with the candle when zooming out.
Any help would be very much appreciated.
Thank you for your time.
James
Comment
-
Hello laoshr
I would suggest looking at the default drawing objects and how they handled this in their Onrender, the most simple example would be in the chart markers script and the Dot objects OnRender. That shows how to incorporate the bar width to be used for rendering.
JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by fx.practic, 10-15-2013, 12:53 AM
|
5 responses
5,406 views
0 likes
|
Last Post
by Bidder
Today, 12:22 AM
|
||
Started by Shai Samuel, 07-02-2022, 02:46 PM
|
4 responses
98 views
0 likes
|
Last Post
by Bidder
Today, 12:11 AM
|
||
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
8 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
160 views
0 likes
|
Last Post Yesterday, 10:23 PM | ||
Started by Belfortbucks, Yesterday, 09:29 PM
|
0 responses
9 views
0 likes
|
Last Post
by Belfortbucks
Yesterday, 09:29 PM
|
Comment