NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Suggestions and Feedback > Suggestions And Feedback

Suggestions And Feedback New feature suggestions and feedback.

Reply
 
Thread Tools Display Modes
Old 08-19-2012, 09:46 AM   #1
DaveS
Senior Member
 
Join Date: Feb 2006
Location: London U.K.
Posts: 152
Thanks: 3
Thanked 2 times in 2 posts
Default Chart Trader Graphics for Strategies.

When I write strategies, I like to include lines to indicate the positions of orders, executions etc. Although I try hard, I cannot do this with the efficiency and beauty of the chart trader.
I know that I can see the chart trader displaying my strategy trades on a seperate chart, but it would be nice not to need two charts. Since the graphics of the chart trader are obviously already in existence, why not just make them avaiolable in a strategy with a command, which might be -
ShowChartTraderGraphics();
DaveS is offline  
Reply With Quote
Old 08-19-2012, 12:26 PM   #2
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

Dave,

You could try using Ray's and Triangles here, however I will make a suggestion to our development team on your behalf and get you a suggestion tracking ID.
NinjaTrader_AdamP is offline  
Reply With Quote
Old 08-20-2012, 08:25 AM   #3
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

Dave,

Your suggestion has ID : 1947
NinjaTrader_AdamP is offline  
Reply With Quote
Old 08-25-2012, 08:27 AM   #4
DaveS
Senior Member
 
Join Date: Feb 2006
Location: London U.K.
Posts: 152
Thanks: 3
Thanked 2 times in 2 posts
Default

Hi AdamP.
Thanks for your suggestions about Rays and Triangles. I did try, and may have gotten somewhere were it not for the fact that the Chart Trader is able to plot on top of the price bars, but NT draw commands place lines, text etc behind the bars, so obscuring my text. Do you know of a way round this?

Thanks
Dave
DaveS is offline  
Reply With Quote
Old 08-25-2012, 09:21 AM   #5
Radical
Senior Member
 
Join Date: Sep 2008
Posts: 543
Thanks: 80
Thanked 187 times in 131 posts
Default

Quote:
Originally Posted by DaveS View Post
Hi AdamP.
Thanks for your suggestions about Rays and Triangles. I did try, and may have gotten somewhere were it not for the fact that the Chart Trader is able to plot on top of the price bars, but NT draw commands place lines, text etc behind the bars, so obscuring my text. Do you know of a way round this?

Thanks
Dave
This might help: http://www.ninjatrader.com/support/f...94&postcount=2
Radical is offline  
Reply With Quote
The following user says thank you to Radical for this post:
Old 08-25-2012, 12:47 PM   #6
DaveS
Senior Member
 
Join Date: Feb 2006
Location: London U.K.
Posts: 152
Thanks: 3
Thanked 2 times in 2 posts
Default

Thanks very much for that Radical. Just what I wanted.
DaveS is offline  
Reply With Quote
Old 08-29-2012, 01:24 AM   #7
DaveS
Senior Member
 
Join Date: Feb 2006
Location: London U.K.
Posts: 152
Thanks: 3
Thanked 2 times in 2 posts
Default

Spoke too soon. It makes no difference what I set ZOrder to, I ve tried loads of different values. It makes no difference at all that I can see.
DaveS is offline  
Reply With Quote
Old 08-29-2012, 06:52 AM   #8
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

Dave,

Generally the ZOrder should affect where these are plotted, i.e. it changes what "layer" the object is in. Could you post a small code snippet of the section where you draw these objects?
NinjaTrader_AdamP is offline  
Reply With Quote
Old 08-29-2012, 07:31 AM   #9
DaveS
Senior Member
 
Join Date: Feb 2006
Location: London U.K.
Posts: 152
Thanks: 3
Thanked 2 times in 2 posts
Default

Hi Adam.
I'm trying to mimic the Chart Trader graphics as close as possible. Sorry, its difficult to get it nicely indented in here. The price bars plot on top of the text and line, obscuring the text.


{
EntryOrder = SubmitOrder(0, OrderAction.Buy, OrderType.Limit, Quantity, LongOrderPrice, 0, "", "BuyOrder");

TradeNumber++;

DrawText("EntryOrderText", false, "Buy LMT", 7, LongOrderPrice, 2, Color.Black, regularFont, StringAlignment.Center, Color.Black, Color.LimeGreen, 10);

DrawLine("EntryOrderLine", false, 5, LongOrderPrice, 0, LongOrderPrice, Color.Cyan, DashStyle.Solid, 2);
}
DaveS is offline  
Reply With Quote
Old 08-29-2012, 07:44 AM   #10
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

Dave,

I have found a thread that may be helpful :

http://www.ninjatrader.com/support/f...ad.php?t=41894

It looks like others had a similar issue, but Koganam seems to have solved it using ZOrder with different numbers than 1,2,3, etc.

It looks like you can set ZOrder in Initialize()

Code:
ZOrder = 1;  //set here
Also, if you are setting the ZOrder from the chart, its possible that the drawing objects are not set to have a separate ZOrder from the indicator.

I believe things like IText inherit IDrawObject. If you look at the IDrawObject info in the help guide :

http://www.ninjatrader.com/support/h...drawobject.htm

You can see there is a "SeparateZOrder" setting that allows you to change whether a drawing object has the same ZOrder as the indicator/strategy, or if it can be set separately. So for example :

Code:
IText drawntext = DrawText("EntryOrderText", false, "Buy LMT", 7, LongOrderPrice, 2, Color.Black, regularFont, StringAlignment.Center, Color.Black, Color.LimeGreen, 10);

drawntext.SeparateZOrder = true;
Last edited by NinjaTrader_AdamP; 08-29-2012 at 07:48 AM.
NinjaTrader_AdamP is offline  
Reply With Quote
Old 08-29-2012, 12:56 PM   #11
DaveS
Senior Member
 
Join Date: Feb 2006
Location: London U.K.
Posts: 152
Thanks: 3
Thanked 2 times in 2 posts
Default

Thanks Adam.
ZOrder = 100; gets my lines in front of the price bars.
DaveS is offline  
Reply With Quote
Old 08-29-2012, 12:59 PM   #12
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

Dave,

No problem, glad I could help.
NinjaTrader_AdamP is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Leased version: Left-click order entries using Chart Trader & automated strategies? llstelle Connecting 3 04-01-2012 05:42 PM
Chart Graphics Highlighting Occasional Problem... Alfred Version 7 Beta General Questions & Bug Reports 7 11-09-2010 10:48 AM
Adding Graphics Without Clearing Chart HNWtrader Charting 4 09-07-2010 11:04 AM
Strategies and Chart Trader warrior Strategy Development 4 01-08-2009 04:50 PM
Strategies tab/ Chart trader properties nico_p Miscellaneous Support 3 04-17-2008 01:52 AM


All times are GMT -6. The time now is 07:09 PM.