MACD Arrows - glitch - NinjaTrader Programming | futures io social day trading
futures io futures trading


MACD Arrows - glitch
Updated: Views / Replies:2,326 / 9
Created: by Slipknot511 Attachments:3

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
 
Thread Tools Search this Thread
 

MACD Arrows - glitch

  #1 (permalink)
Elite Member
Springfield,Missouri, USA
 
Futures Experience: Advanced
Platform: NinjaTrader (It's a love/hate relationship)
Favorite Futures: CL, TF, 6E
 
Slipknot511's Avatar
 
Posts: 176 since May 2010
Thanks: 60 given, 312 received

MACD Arrows - glitch

I'm having issues with an indicator that I use. I'm not a programmer and have no desire to be one, but I would like to see if anyone here can find and repair whatever is causing this indicator to not plot.

This indicator is not mine, but it is open source to the best of my knowledge. It is an MACD that plots arrows on the chart after a MACD/Average crossover, but also uses SMA and Stoch conditions before plotting.

The problem is that after using for a short while, this indicator will simply not plot after changing anything on the chart. It could be as simple as changing the instrument or days loaded that will cause it to glitch. Once it stops plotting, I have been unable to ever get it to plot again. I've tried everything from re-importing, re-booting Windows, and even re-installing NinjaTrader.
It is a fairly old indicator. Probably exported with NT6. It imports fine, compiles fine in both 6.5 and 7.

If anyone can discover why it is doing this and repair it, I'd be very grateful.

Attached is the indicator plus a txt file that accompanied it giving a decent description of how it works.

Attached Files
Register to download File Type: zip MACDScalpArrow.zip (12.5 KB, 65 views)
Register to download File Type: txt MACDScalpArrow Explanation.txt (1.9 KB, 70 views)

Last edited by Slipknot511; November 19th, 2010 at 04:51 PM. Reason: modified per post #5
Reply With Quote
The following user says Thank You to Slipknot511 for this post:
 
  #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
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary


If you access Stochastics(8, 3, 3).K[2] for CurrentBar = 1, this is not defined, so you may run into problems. Not tested.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #4 (permalink)
Elite Member
Springfield,Missouri, USA
 
Futures Experience: Advanced
Platform: NinjaTrader (It's a love/hate relationship)
Favorite Futures: CL, TF, 6E
 
Slipknot511's Avatar
 
Posts: 176 since May 2010
Thanks: 60 given, 312 received

Thanks for the reply, but I have no idea what that means. See if what I write below is relevant to what you are saying.

Update: It seems to have something to do with the amount of data. For example, if I plot a 6range chart, the indicator is OK as long as I don't have more than 2 days loaded. With a 15 minute chart, I can have 20 days.
I have the "Maximum bars look back" set to infinite, but that doesn't fix anything.
Any ideas?


Last edited by Slipknot511; November 19th, 2010 at 04:25 PM. Reason: spelling
Reply With Quote
 
  #5 (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,353 given, 83,234 received

Tip
Please post code in the [code](put code here)[/code] tags. When posting an entire indicator please add it as an attachment instead of pasting it into the body of your message.



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
 
  #6 (permalink)
Elite Member
las vegas
 
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: Velocity/IB
Favorite Futures: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 836 received


Slipknot511 View Post
I have the "Maximum bars look back" set to infinite, but that doesn't fix anything.
Any ideas?


I think that would make it worse. Unless the formula is looking back more than 256 bars, you want to set it at 256.

Fat is saying you need to edit the indicator and change If (Currentbar == 0) to If (Currentbar < fast + slow + smooth +20). For any indicator you want to return null or 0 when referencing a prior bar for initial periods in an amount greater than the longest period parameter length. The simplest thing is to add up all period parameters and add some margin of safety, e.g. 20, then you know you have your bases covered or you can just use some big number like a 100. Otherwise on bar 1 or bar 2 or whatever, the code it is looking for information in the past that does not exist on the chart and it gets confused.

Reply With Quote
The following user says Thank You to vegasfoster for this post:
 
  #7 (permalink)
Elite Member
Springfield,Missouri, USA
 
Futures Experience: Advanced
Platform: NinjaTrader (It's a love/hate relationship)
Favorite Futures: CL, TF, 6E
 
Slipknot511's Avatar
 
Posts: 176 since May 2010
Thanks: 60 given, 312 received


vegasfoster View Post
I think that would make it worse. Unless the formula is looking back more than 256 bars, you want to set it at 256.

Fat is saying you need to edit the indicator and change If (Currentbar == 0) to If (Currentbar < fast + slow + smooth +20). For any indicator you want to return null or 0 when referencing a prior bar for initial periods in an amount greater than the longest period parameter length. The simplest thing is to add up all period parameters and add some margin of safety, e.g. 20, then you know you have your bases covered or you can just use some big number like a 100. Otherwise on bar 1 or bar 2 or whatever, the code it is looking for information in the past that does not exist on the chart and it gets confused.

That did. Thanks much to Fat Tails for identifying the problem so quickly & thank-you vegasfoster for "putting the cookies on the bottom shelf" so even I could understand it.

Reply With Quote
 
  #8 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary

Just quickly installed the indicator, toggled to CL and indicator disappeared.

This is the message shown in the trace file:

2010-11-19 22:54:53:593 ERROR: Error on calling 'OnBarUpdate' method for indicator 'MACDScalpArrow' on bar 1: You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.

This confirms exactly what I supposed.

If you are at bar 1 - which is the second bar of your chart - and you call a data series value two bars ago that would be the bar -1, which prior to the start of the chart. That creates an out-of range exception.

When I try to export the indicator this cannot be done, because the NinjaTrader Stochastics indicator has a bug. So what I suggest is that you simple copy the indicator attached below into your indicator directory open it from within NinjaTrader and compile it.

Here is the stochastics bug already confirmed, was not the first to discover it. Was the third new NinjaTrader bug that I found this week.

http://www.ninjatrader.com/support/forum/showthread.php?p=205168#post205168

Attached Files
Register to download File Type: cs MACDScalpArrow.cs (10.7 KB, 70 views)
Reply With Quote
The following 3 users say Thank You to Fat Tails for this post:
 
  #9 (permalink)
Elite Member
Auckland
 
Futures Experience: Advanced
Platform: Ninja Trader
Broker/Data: Zen-Fire
Favorite Futures: CL and ES
 
Posts: 710 since Apr 2010
Thanks: 3,720 given, 661 received

Fat Tails

You are a true LEGEND.

You amaze me with your kindness and dedication.

We are so very fortunate to have you.

Thank you for everything you have done and doing for us.

sharmas


Last edited by sharmas; November 19th, 2010 at 07:21 PM.
Reply With Quote
The following user says Thank You to sharmas for this post:
 
  #10 (permalink)
Elite Member
Springfield,Missouri, USA
 
Futures Experience: Advanced
Platform: NinjaTrader (It's a love/hate relationship)
Favorite Futures: CL, TF, 6E
 
Slipknot511's Avatar
 
Posts: 176 since May 2010
Thanks: 60 given, 312 received


Thank you very much. I copied and compiled and it works great.
How you could see that so easily is beyond me.
I don't use very many indicators, but this is one that I like. I really appreciate your help.

Reply With Quote

Reply



futures io > > > > > MACD Arrows - glitch

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 - small glitch Todd NinjaTrader Programming 27 October 10th, 2014 05:21 PM
need arrows for Multicharts- ADXVMA, SMI, zerolag MACD emini_Holy_Grail EasyLanguage Programming 1 January 17th, 2011 12:16 PM
Looking for a simple MACD strategy. MACD Xover LONG, go LONG roshareid NinjaTrader Programming 2 April 11th, 2010 09:05 PM
Creating Arrows spinnybobo NinjaTrader Programming 3 October 15th, 2009 10:45 AM
Arrows Peter NinjaTrader Programming 6 June 15th, 2009 10:19 AM


All times are GMT -4. The time now is 08:32 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-15 in 0.14 seconds with 20 queries on phoenix via your IP 54.234.247.118