• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawRegion seems to be inefficient

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sandman
    replied
    Afshinmoshrefi. I experienced the same problem. It's very heavy on the CPU if the regions are run OnBarClose=False. There are a couple of ways I use to lighten the load. You can try using OnBarClose=False only on the smallest region e.g. 13/50. For 50/100 and 100/200 you could set it to TRUE. Another possibility is to determine which EMAs in a 5Min DataSeries correspond to the 1Min ones. There's a formula for EMAs somewhere in the forum from Harry that lays out how to convert EMAs from one timeframe into another. Then use the colored regions of the 5Min DataSeries in a 1Min chart, set OnBarClose=TRUE. Hope this gives you at least a couple of ideas if you had not thought of these yet.

    sandman

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello afshinmoshrefi,

    Thanks for your question.

    The DrawRegion drawing tool would be the easiest and supported way to color a region between EMA's.

    You could try coloring the region yourself through custom plotting, but I would not be able to provide further direction for doing so other than pointing out the "CustomPlotSample" example indicator that is included with NinjaTrader 7. The method used for custom plotting is undocumented. I also would not be able to comment on the significance of performance changes you could achieve as the drawing tools in NT7 are closed source.

    If there is anything else I can do to assist, please let me know.

    Leave a comment:


  • afshinmoshrefi
    started a topic DrawRegion seems to be inefficient

    DrawRegion seems to be inefficient

    I have an indicator that colors the regions between 13, 50, 100 and 200 EMAs. All works fine except when market moves very fast, I can see that NT7 has trouble keeping up and locks up for a few seconds. With some experiments, I've realized, the DrawRegion is causing the issue. Is there anyway to color between EMA more efficiently?

Latest Posts

Collapse

Topics Statistics Last Post
Started by fx.practic, Today, 03:09 PM
1 response
10 views
0 likes
Last Post NinjaTrader_Jesse  
Started by Gav_G, Today, 01:14 PM
6 responses
15 views
0 likes
Last Post Gav_G
by Gav_G
 
Started by Ron N, Today, 12:56 PM
1 response
14 views
0 likes
Last Post NinjaTrader_PatrickG  
Started by MarkWise, Today, 12:27 PM
2 responses
5 views
0 likes
Last Post MarkWise  
Started by foxy_rav, Today, 12:07 PM
3 responses
5 views
0 likes
Last Post NinjaTrader_Kate  
Working...
X