Logic Error in Strategy - NinjaTrader Programming | futures io social day trading
futures io futures trading


Logic Error in Strategy
Updated: Views / Replies:2,939 / 14
Created: by HJay Attachments:2

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 100,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

 
 2  
 
Thread Tools
 

Logic Error in Strategy

 
USA
 
Trading Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus/Zen-Fire
Favorite Futures: futures
 
HJay's Avatar
 
Posts: 197 since Aug 2009

Logic Error in Strategy

Hey guys...

I am building a strategy around the transition point from StepDown/StepUP using the StepMAv73. I have it built and it gives the right signal at times and at other times if seems to generate an entry that makes no sense to me. Can somebody take a look at this screen shot and see where my logic error is (I'm using the wizard and really dont want to unlock the code at this point as I am still fumbling my way through.)

Thanks in advance,

HJay

Attached Thumbnails
Logic Error in Strategy-stepma.png  
Visit my futures io Trade Journal
 
 
Site Administrator
Manta, Ecuador
 
Trading Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 47,599 since Jun 2009
Thanks: 30,337 given, 89,700 received

Without the code it's hard to say. But guessing I would say StepMA painted "up" on that bar, then re-painted it back to "down" on the next bar.

The easiest way to test for these things is to draw an arrow or something when it really changes by comparing the [1] bar value to [0] and if different, draw arrow.

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 (see why)

Follow me on Twitter Visit my Facebook Visit my futures io Trade Journal
 
 
Hartford, CT. USA
 
Trading Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AMP/CQG, Kinetick
Favorite Futures: RTY
 
RJay's Avatar
 
Posts: 685 since Jun 2009
Thanks: 744 given, 762 received


HJay,

Are you using update on bar close or update every tick?

I think you will need the bar close update setting or reference Close[1] to eliminate the chop.

RJay

 
 
Frankfurt
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 923 received

Hjay,
all indicators with multicolor-functions are hard up to impossible to code strats with if you are not an experienced coder. Because they have multiple plots+values they work with + lots of them dont work in the coding-wizard at all.

max-td
 
 
USA
 
Trading Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus/Zen-Fire
Favorite Futures: futures
 
HJay's Avatar
 
Posts: 197 since Aug 2009

hmm.. in the strategy builder RJay it doesnot appear to have the option of setting on bar close or not so I am not sure what it does by default.. still digging..

Visit my futures io Trade Journal
 
 
Frankfurt
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 923 received

in example with StepMA :
StepDown gives out a different value then the one you see in the chart if its not plotted (if StepUp is active),
thats very confusing.

max-td
 
 
Hartford, CT. USA
 
Trading Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AMP/CQG, Kinetick
Favorite Futures: RTY
 
RJay's Avatar
 
Posts: 685 since Jun 2009
Thanks: 744 given, 762 received


HJay View Post
hmm.. in the strategy builder RJay it doesnot appear to have the option of setting on bar close or not so I am not sure what it does by default.. still digging..


There is a checkbox in one of the strats earlier screens.

 
 
USA
 
Trading Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus/Zen-Fire
Favorite Futures: futures
 
HJay's Avatar
 
Posts: 197 since Aug 2009

Re: Logic Error in Strategy

Oh yes that box is checked

Visit my futures io Trade Journal
 
 
Site Administrator
Manta, Ecuador
 
Trading Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 47,599 since Jun 2009
Thanks: 30,337 given, 89,700 received


RJay View Post
HJay,

Are you using update on bar close or update every tick?

I think you will need the bar close update setting or reference Close[1] to eliminate the chop.

RJay

RJay is right, you should never use COBC = false (update every tick) unless you are quite experienced and know exactly what you're doing. Most strategies won't handle it without explicit code.

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 (see why)

Follow me on Twitter Visit my Facebook Visit my futures io Trade Journal
 
 
Hartford, CT. USA
 
Trading Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AMP/CQG, Kinetick
Favorite Futures: RTY
 
RJay's Avatar
 
Posts: 685 since Jun 2009
Thanks: 744 given, 762 received



max-td View Post
Hjay,
all indicators with multicolor-functions are hard up to impossible to code strats with if you are not an experienced coder. Because they have multiple plots+values they work with + lots of them dont work in the coding-wizard at all.

HJay,

I'm going to agree with max-td to a point.

StepUp and stepDown should not be mixed.

Try something like this?


"if"

stepUp[1] >= StepUp[0]

or

stepUp[1] <= StepUp[0]

and / or

stepDown[1] >= StepDown[0]

or

stepDown[1] <= StepDown[0]

"do something"

RJay


 



futures io > > > > > Logic Error in Strategy
Thread Tools



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

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now
 

Show us your trading desks and win over $5,000 in prizes w/Jigsaw Trading

August
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
TSSuperTrend Strategy error Azzzz NinjaTrader Programming 32 October 7th, 2011 07:38 AM
Strategy Condition Logic >> my wetware Trader.Jon NinjaTrader Programming 2 May 24th, 2010 04:17 PM
My First MTF Strategy .. need some minor error fixes Trader.Jon The Elite Circle 4 May 14th, 2010 08:58 PM
Strategy Analyzer Error jeffbg123 NinjaTrader Programming 3 April 8th, 2010 08:17 PM
DoubleMA strategy error dsraider NinjaTrader Programming 5 January 25th, 2010 03:13 PM


All times are GMT -4. The time now is 05:23 AM. (this page content is cached, log in for real-time version)

Copyright © 2019 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