NexusFi: Find Your Edge


Home Menu

 





Logic Error in Strategy


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one HJay with 4 posts (0 thanks)
    2. looks_two RJay with 3 posts (0 thanks)
    3. looks_3 Big Mike with 2 posts (0 thanks)
    4. looks_4 max-td with 2 posts (0 thanks)
    1. trending_up 5,665 views
    2. thumb_up 0 thanks given
    3. group 5 followers
    1. forum 14 posts
    2. attach_file 2 attachments




 
Search this Thread

Logic Error in Strategy

  #1 (permalink)
 
HJay's Avatar
 HJay 
USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire
Trading: futures
Posts: 147 since Aug 2009

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
Click image for larger version

Name:	StepMA.png
Views:	179
Size:	248.7 KB
ID:	1394  
Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Futures True Range Report
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Build trailing stop for micro index(s)
Psychology and Money Management
 
  #2 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,399 since Jun 2009
Thanks Given: 33,175
Thanks Received: 101,541

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

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 682 since Jun 2009
Thanks Given: 757
Thanks Received: 787


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

Reply With Quote
  #4 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

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
Reply With Quote
  #5 (permalink)
 
HJay's Avatar
 HJay 
USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire
Trading: futures
Posts: 147 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 NexusFi Trade Journal Started this thread Reply With Quote
  #6 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

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
Reply With Quote
  #7 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 682 since Jun 2009
Thanks Given: 757
Thanks Received: 787


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.

Reply With Quote
  #8 (permalink)
 
HJay's Avatar
 HJay 
USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire
Trading: futures
Posts: 147 since Aug 2009

Oh yes that box is checked

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #9 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,399 since Jun 2009
Thanks Given: 33,175
Thanks Received: 101,541


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

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #10 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 682 since Jun 2009
Thanks Given: 757
Thanks Received: 787



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

Reply With Quote




Last Updated on November 1, 2009


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts