![]() |
|
|||||||
| Suggestions And Feedback New feature suggestions and feedback. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Feb 2006
Location: London U.K.
Posts: 152
Thanks: 3
Thanked 2 times in 2 posts
|
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(); |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
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.
Adam P.
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
Dave,
Your suggestion has ID : 1947
Adam P.
NinjaTrader Customer Service |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Feb 2006
Location: London U.K.
Posts: 152
Thanks: 3
Thanked 2 times in 2 posts
|
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 |
|
|
|
|
|
#5 | |
|
Senior Member
Join Date: Sep 2008
Posts: 543
Thanks: 80
Thanked 187 times in 131 posts
|
Quote:
|
|
|
|
|
|
The following user says thank you to Radical for this post: |
|
|
|
#6 |
|
Senior Member
Join Date: Feb 2006
Location: London U.K.
Posts: 152
Thanks: 3
Thanked 2 times in 2 posts
|
Thanks very much for that Radical. Just what I wanted.
|
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Feb 2006
Location: London U.K.
Posts: 152
Thanks: 3
Thanked 2 times in 2 posts
|
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.
|
|
|
|
|
|
#8 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
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?
Adam P.
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Feb 2006
Location: London U.K.
Posts: 152
Thanks: 3
Thanked 2 times in 2 posts
|
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); } |
|
|
|
|
|
#10 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
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 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;
Adam P.
NinjaTrader Customer Service
Last edited by NinjaTrader_AdamP; 08-29-2012 at 07:48 AM.
|
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Feb 2006
Location: London U.K.
Posts: 152
Thanks: 3
Thanked 2 times in 2 posts
|
Thanks Adam.
ZOrder = 100; gets my lines in front of the price bars. |
|
|
|
|
|
#12 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
Dave,
No problem, glad I could help.
Adam P.
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |