Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
i ported an indicator from mt4 to nt7 and it does actually work.
but the code is very ineffective because it recalculates all the bars each time OnBarUpdate is called.
does anybody have a good idea how to fix this?
thank you,
mike
Can you help answer these questions from other members on NexusFi?
Hey guys, I thought many of you would enjoy and benefit from this thread. My intention is to have each poster reply and describe in as much detail as possible an indicator they want created for NinjaTrader.
The programmers on the forum (there are many), …
Hope this helps,
Rick
"If you're going to panic during a trade............. panic early."
yes, as far as i know its not possible using DrawRegion to have a semi transparent area like i want it in the indicator.
but the plot method isnt a problem at all and doesnt need to be edited.
Okay, I understand but to close the loop on draw region, from the ninja help file.
Definition
Draws a region on a chart.
Method Return Value
An IRegion object that represents the draw object.
Syntax
DrawRegion(string tag, int startBarsAgo, int endBarsAgo, IDataSeries series, double y, Color outlineColor, Color areaColor, int areaOpacity)
DrawRegion(string tag, int startBarsAgo, int endBarsAgo, IDataSeries series1, IDataSeries series2, Color outlineColor, Color areaColor, int areaOpacity)
DrawRegion(string tag, DateTime startTime, DateTime endTime, IDataSeries series, double y, Color outlineColor, Color areaColor, int areaOpacity)
DrawRegion(string tag, DateTime startTime, DateTime endTime, IDataSeries series1, IDataSeries series2, Color outlineColor, Color areaColor, int areaOpacity)
Parameters
tag
A user defined unique id used to reference the draw object. For example, if you pass in a value of "myTag", each time this tag is used, the same draw object is modified. If unique tags are used each time, a new draw object will be created each time.
startBarsAgo
The starting bar (x axis co-ordinate) where the draw object will be drawn. For example, a value of 10 would paint the draw object 10 bars back.
startTime
The starting time where the draw object will be drawn.
endBarsAgo
The end bar (x axis co-ordinate) where the draw object will terminate
endTime
The end time where the draw object will terminate
series, series1, series2
Any DataSeries type object such as an indicator, Close, High, Low etc.. The value of the object will represent a y value.
y
Any double value
outlineColor
Region outline color (reference)
areaColor
Region fill color (reference)
areaOpacity
Sets the level of transparency for the fill color. Valid values between 0 - 10. (0 = completely transparent, 10 = no opacity)
Examples
// Fills in the region between the upper and lower bollinger bands
DrawRegion("tag1", CurrentBar, 0, Bollinger(2, 14).Upper, Bollinger(2, 14).Lower, Color.Empty, Color.Lime, 2);
Be yourself; everyone else is already taken. Oscar Wilde
yes you are right, i changed the code
but the main problem still remains unsolved...
in case this helps with motivation i am willing to pay for the fix of the code
i have 16gb of ram thats not the problem.
i am using the indicator to trade gold on a relative small better renko chart and due to intense calculations during fast moving market ninjatrader hangs/freezes for a few seconds. so its not possible to set orders during these times.
i use it with cobc=false and each tick the indicator is calculated over all x thousand bars.
i really need this to be fixed...