Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
DrawRegion seems to be inefficient
Collapse
X
-
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?Tags: None
-
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.JimNinjaTrader Customer Service
-
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
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by cre8able, Today, 01:16 PM
|
1 response
3 views
0 likes
|
Last Post Today, 01:30 PM | ||
Started by chbruno, 04-24-2024, 04:10 PM
|
3 responses
47 views
0 likes
|
Last Post Today, 01:29 PM | ||
Started by samish18, Today, 01:01 PM
|
1 response
6 views
0 likes
|
Last Post Today, 01:25 PM | ||
Started by WHICKED, Today, 12:56 PM
|
1 response
8 views
0 likes
|
Last Post Today, 01:17 PM | ||
Started by WHICKED, Today, 12:45 PM
|
1 response
11 views
0 likes
|
Last Post Today, 01:08 PM |
Comment