I need help with an indicator - NinjaTrader Programming | futures io social day trading
futures io futures trading


I need help with an indicator
Updated: Views / Replies:3,331 / 23
Created: by mk77ch Attachments:6

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 6  
 
Thread Tools Search this Thread
 

I need help with an indicator

  #1 (permalink)
Elite Member
Switzerland
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Dorman
Favorite Futures: Currency Futures, ES
 
mk77ch's Avatar
 
Posts: 76 since Oct 2010
Thanks: 12 given, 64 received

I need help with an indicator

hi guys,

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

Attached Files
Register to download File Type: zip mkGoldBands.zip (5.8 KB, 14 views)
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Holland, Michigan
 
Futures Experience: None
Platform: ninjatrader
Broker/Data: CQG
Favorite Futures: Acoustic Guitar
 
trs3042's Avatar
 
Posts: 1,802 since Jun 2009
Thanks: 23,771 given, 5,600 received



mk77ch View Post
hi guys,

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

If you get no response here.....................try posting here: https://futures.io/elite-circle/1261-want-your-ninjatrader-indicator-created-free-1016.html

Hope this helps,

Rick

"If you're going to panic during a trade............. panic early."
Reply With Quote
 
  #4 (permalink)
Elite Member
Cedar Rapids, iowa
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: Ninjatrader - Continuum
Favorite Futures: 6E, TF, 6J
 
Tasker_182's Avatar
 
Posts: 626 since Aug 2009
Thanks: 426 given, 1,126 received


mk77ch View Post
hi guys,

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

Is there a particular reason you are using a custom plot method verses DrawRegion?

"Money is better than poverty, if only for financial reasons." - Woody Allen
Reply With Quote
 
  #5 (permalink)
Elite Member
Switzerland
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Dorman
Favorite Futures: Currency Futures, ES
 
mk77ch's Avatar
 
Posts: 76 since Oct 2010
Thanks: 12 given, 64 received


Tasker_182 View Post
Is there a particular reason you are using a custom plot method verses DrawRegion?

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.

the problem is located around line 74:

int01 = CurrentBar-1;

and below from:

while(int01 >= 0)

Reply With Quote
 
  #6 (permalink)
Elite Member
Cedar Rapids, iowa
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: Ninjatrader - Continuum
Favorite Futures: 6E, TF, 6J
 
Tasker_182's Avatar
 
Posts: 626 since Aug 2009
Thanks: 426 given, 1,126 received


mk77ch View Post
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.

the problem is located around line 74:

int01 = CurrentBar-1;

and below from:

while(int01 >= 0)

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);

"Money is better than poverty, if only for financial reasons." - Woody Allen
Reply With Quote
 
  #7 (permalink)
Elite Member
Switzerland
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Dorman
Favorite Futures: Currency Futures, ES
 
mk77ch's Avatar
 
Posts: 76 since Oct 2010
Thanks: 12 given, 64 received

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

Attached Files
Register to download File Type: zip mkGoldBands.zip (3.4 KB, 14 views)

Last edited by mk77ch; May 2nd, 2014 at 03:14 PM.
Reply With Quote
 
  #8 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,218 since Jun 2009
Thanks: 628 given, 6,316 received
Forum Reputation: Legendary


mk77ch View Post
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

running below 20% CPU usage with your indicator, 8G of memory, maybe you need more memory?

Reply With Quote
 
  #9 (permalink)
Elite Member
Switzerland
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Dorman
Favorite Futures: Currency Futures, ES
 
mk77ch's Avatar
 
Posts: 76 since Oct 2010
Thanks: 12 given, 64 received


cory View Post
running below 20% CPU usage with your indicator, 8G of memory, maybe you need more memory?

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...

Reply With Quote
 
  #10 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,352 given, 83,230 received


@Zondor likes a challenge.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote

Reply



futures io > > > > > I need help with an indicator

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening Range Indicator (w/ Indicator Input) wuileng NinjaTrader 5 January 21st, 2014 07:52 AM
How to call this indicator within the indicator/strategy zikonc NinjaTrader 2 July 26th, 2012 04:45 PM
Indicator Based Upon Other Indicator Colors ScorpioTravis NinjaTrader Programming 12 June 21st, 2012 07:29 PM
Adding Constant Line Indicator to Another Indicator ceramictilepro NinjaTrader Programming 9 September 22nd, 2011 11:43 PM


All times are GMT -4. The time now is 02:34 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-14 in 0.14 seconds with 20 queries on phoenix via your IP 54.221.76.68