![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Suggestions And Feedback New feature suggestions and feedback. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Nov 2007
Location: Arlington Heights, IL
Posts: 100
Thanks: 0
Thanked 4 times in 4 posts
|
I have a chart with 2 instruments, 6E scaled on LEFT in the top window.
I have a strategy that does a DrawLine. The DrawLine places the line endpoints at the wrong price when the 6E is scaled on the LEFT. See attached picture #1 When I switched the scaling for 6E to RIGHT, the line endpoints are correct. See attached picture #2. The chart is a LineOnClose type which clearly shows the price at the time of the DrawLine. Here is the DrawLine cmd I used: DrawLine(CurrentBar.ToString()+"L"+lineCount, true, barsAgo, Close[barsAgo], 0, Close[0], lineColor, DashStyle.Solid, 1); Seems like a bug. Gary |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
|
Hello,
Thanks for the post and patience while I reviewed this. It looks like you have one of your chart data series set to transparent, can you please change it to a color and line on close and then resend the screenshot so I can see where the other data series is. Furthermore is this a multi time frame/instrument script? If so are you doing BarsInProgress filtering for your draw Object? If both these check out I will run a test script on my side and try to reproduce it with your code segment. Thanks. -Brett
Brett
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Nov 2007
Location: Arlington Heights, IL
Posts: 100
Thanks: 0
Thanked 4 times in 4 posts
|
Yes, there are two data series on the chart. The 2nd data series in the bottom panel is very scrunched up at the bottom of the chart previously attached. It is a thin red line because both data series are set to line-on-close.
At the time I was running this strategy, it was after hours and I was connected to the Kinetick End-Of-Day data feed (so that the strategy would be enabled). The strategy itself does not add the 2nd data series. The strategy uses indicators that do use two data series. I had code in my strategy to determine if it was even being called for the 2nd data series OnBarUpdate and it is not (BarsInProgress never equals 1). Therefore, I conclude that this is NOT a BarsInProgress filtering issue. I am familiar with the code required to deal with multiple data series because the underlying indicators have that logic in them. On each OnBarUpdate call, the strategy calls [indicator].Update(). The only variable that seems to affect the problem is where the data series (that is being drawn on) has it's scaling. When I switch data series 1 to be scaled on the left (same for 'Overlay'), the lines drawn are not correct vertically. When I switch it to be scaled on the right, they draw correctly. -Gary |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
|
In this case I would need to take a look at the code that is generating the drawing object. Can you please post a simplified example for me to reproduce this on my side and check into it further.
-Brett
Brett
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| EMA in Panel2 scaled 0 -100 | andrew56 | Indicator Development | 4 | 12-13-2011 11:44 AM |
| Mirus-Accounts Cash Value incorrect when left overnight | mjc4118 | Version 7 Beta General Questions & Bug Reports | 6 | 07-13-2010 01:17 PM |
| draws tools | pchofard | Suggestions And Feedback | 3 | 09-18-2009 11:39 AM |
| Positions P/L incorrect with two strategies trading the same instrument | cunparis | Automated Trading | 14 | 02-05-2009 01:05 PM |
| Scaled in position adjustment targets | trymph | Miscellaneous Support | 1 | 09-12-2005 07:46 AM |