![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Join Date: Mar 2006
Location: , ,
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
|
Please compile the DrawText.cs file, open a 15 minute chart window on the ES-09-06 and also open an Output window.
I am reporting the following problems: 1. Sometimes you will see from the Output window, that I have sent DrawText() a new volume, but the chart display did not refresh the data. If you click on the active price in the y-axis, then the new volume will appear in the chart. 2. You will sometimes see the volume beging displayed as ". 10 * 10". When this problem occurs, it is always this number. Now this is particularly mysterious because in looking at the source code, you can see that I do not output in ". number * number" format, I only output in ". number" format to DrawText(). However, in my real indicator, I am outputting in the ". number * number" format. But I have deleted my real indicator and recompiled using just the DrawText.cs file as the only non-system indicator. I dont know why I am still getting this number mysteriously coming up. This is happening in my real indicator too. I think it happens when the volume is 1 sometimes. I know I am not outputting that volume when this occurs because I see the real volume that I am sending DrawText() in the Output window. 3. Sometimes, when we move to a new 15 minute bar, DrawText() will display that mysterious ". 10 * 10" in the previously active bar instead of the newly active bar. I always output to bar=0 (which should be the current active bar) in DrawText(). Then new incoming data will cause DrawText() to display the new volume correctly in the correct bar. Its just that, for a few seconds , you see the weird ". 10 * 10" in the previous bar and the new bar has no DrawText() data. When this happens, DrawText() is going to the correct price, but the wrong bar. So I am observing 3 problems: chart not refreshing with the DrawText() data, DrawText() showing the wrong number, and sometimes DrawText() will go to the previous bar when we move to a new 15 minute bar. Let me know if you need further clarification. I would like to see if you can confirm these problems. You really need to observe this when the market is quiet -- during after market hours. You really wont be able to see this when the markets are open because the incoming data is too fast. As always, thanks in advance for your help. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Can you send the cs file, the txt file looks funny.
Ray
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Join Date: Mar 2006
Location: , ,
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
|
Ray, that is the .cs file, the site wont take a .cs file, so I just renamed it to a .txt.
After you rename it back to .cs, doesn't it compile? |
|
|
|
|
|
#4 |
|
Join Date: Mar 2006
Location: , ,
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
|
Ray, I have sent you the .cs file zipped. Thanks
|
|
|
|
|
|
#5 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Hi Richard,
Very clear, the OnBarUpdate() method is not going to fire the same as market data events. MarketData event handler will fire for every change in market data. The OnBarUpdate() method fires when the chart display updates. There is optimization in the chart refresh code. An easy exampleusing three incoming market data eventswith CalculateOnBarClose set to false - Last = 1000.00 Vol = 1 Last = 1000.25 Vol = 1 <-- Chart updates OnBarUpdate() fires Last = 1000.25 Vol = 1 <-- Chart does not update OnBarUpdate() does not fire Hope this clears things up. Ray
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Join Date: Mar 2006
Location: , ,
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks Ray for the fast reply.
I agree with you and can understand about the refresh problem being an optimization in the charts. I can live with this. What about the other 2 problems I reported? You have to watch it after market close and you should be able to duplicate them. These are obvious problems when looking at the chart and its hard to explain to users. Thanks. Richard |
|
|
|
|
|
#7 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Send me private mail to ray@ninjatrader.com with contact number, I would want to understand this better via telephone.
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|