Simple strategy - NinjaTrader Programming | futures io social day trading
futures io futures trading


Simple strategy
Updated: Views / Replies:3,594 / 19
Created: by vast Attachments:1

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

Simple strategy

  #11 (permalink)
Elite Member
Australia
 
Futures Experience: Intermediate
Platform: Ninja
 
vast's Avatar
 
Posts: 167 since Jun 2009
Thanks: 154 given, 59 received

I get a lot of trades though. I was hoping for one trade each time the DMA changes from falling to rising.
Here is a screen shot. 2009-07-22_1919

Reply With Quote
 
  #12 (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,238 since Jun 2009
Thanks: 29,350 given, 83,220 received

Is because you are only asking if it is Signal[0] == 1. That means if long.

What you need to do is add a second if statement that checks the prior bar, such as Signal[1] != 1.

This means if bar 1 is not equal to 1, and bar 0 is equal to 1, then that means it changed and go long.

 
Code
if (DoubleMA(30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA,30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA).Signal[0] == 1)

if (DoubleMA(30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA,30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA).Signal[1] != 1)

{
                EnterLongLimit(DefaultQuantity, GetCurrentAsk(), "Long");
            }
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.


Last edited by Big Mike; July 22nd, 2009 at 08:32 PM. Reason: fixed code
Reply With Quote
 
  #13 (permalink)
Elite Member
Australia
 
Futures Experience: Intermediate
Platform: Ninja
 
vast's Avatar
 
Posts: 167 since Jun 2009
Thanks: 154 given, 59 received


It seems to be not lining up with the DMA. Is that because the DMA paints back 2 bars?
2009-07-22_1924

Reply With Quote
 
  #14 (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,238 since Jun 2009
Thanks: 29,350 given, 83,220 received


vast View Post
It seems to be not lining up with the DMA. Is that because the DMA paints back 2 bars?
2009-07-22_1924

There is a whole thread about DMA and signal issues. (I think this is it, not sure). I personally don't use it so can't comment. You might try using the DMV dataseries and see if it works any better for you. DMV returns the value not a signal, so you need to use Rising or Falling:

 
Code
if (Rising(DoubleMA(30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA,30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA).DMV))
Also as mentioned earlier by max-td here you might eliminate DoubleMA and do it his way. Although honestly, I've not tested this and am not sure if it produces the same results as DoubleMA.

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
 
  #15 (permalink)
Elite Member
Australia
 
Futures Experience: Intermediate
Platform: Ninja
 
vast's Avatar
 
Posts: 167 since Jun 2009
Thanks: 154 given, 59 received

Ok. Thanks.

Reply With Quote
 
  #16 (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,238 since Jun 2009
Thanks: 29,350 given, 83,220 received

I fixed this post, I didn't realize some extra code was in there until now.

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
 
  #17 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,572 given, 3,982 received

Vast, here is a basic strategy, made with the wizard in about 30 seconds, without using DoubleMA but only ZeroLagEMA.
Maybe it can help.

Attached Files
Register to download File Type: cs ZeroZero.cs (21.4 KB, 38 views)
Reply With Quote
The following user says Thank You to sam028 for this post:
 
  #18 (permalink)
Elite Member
Australia
 
Futures Experience: Intermediate
Platform: Ninja
 
vast's Avatar
 
Posts: 167 since Jun 2009
Thanks: 154 given, 59 received

Thanks Sam.
I guess I was hoping that I could build a strategy on the DMA and other indicators. I had hoped to use the change of colour as a reference point. ie. When the DMA turns from falling to rising is changes colour.
Anyway, it seems to be not possible. The entries are too slow.
Regards

Reply With Quote
 
  #19 (permalink)
Just starting out...
Bentiem
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: ZenFire
Favorite Futures: ES TF
 
Victor 10's Avatar
 
Posts: 4 since Jun 2010
Thanks: 3 given, 1 received

Thanks BigMike
after 2 weeks HERE is the answer .... "Keep in mind if you use the wizard it places + sign instead of . in a couple of places, you need to manually change it, but your string above seems fine.

Mike "
i replaced the'+' with a '.' and now it will compile!!
Vic10

Reply With Quote
The following user says Thank You to Victor 10 for this post:
 
  #20 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received



vast View Post
Thanks Sam.
I guess I was hoping that I could build a strategy on the DMA and other indicators. I had hoped to use the change of colour as a reference point. ie. When the DMA turns from falling to rising is changes colour.
Anyway, it seems to be not possible. The entries are too slow.
Regards

Have a look at the Aardvark strategy that nano posted recently in the elite section .. lots of good code to help you out

Reply With Quote

Reply



futures io > > > > > Simple strategy

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help with simple strategy with SMA dimkrinichnyi NinjaTrader Programming 17 November 1st, 2011 02:25 PM
Simple RSI Strategy frostengine NinjaTrader Programming 2 October 30th, 2011 01:12 PM
Simple HMA Strategy honkin NinjaTrader Programming 5 January 4th, 2011 06:35 PM
simple go long or go short strategy stephenszpak NinjaTrader Programming 7 July 21st, 2010 11:05 AM
Need help writing a simple strategy soumi71 The Elite Circle 4 November 17th, 2009 01:05 PM


All times are GMT -4. The time now is 09:29 PM.

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-12 in 0.12 seconds with 20 queries on phoenix via your IP 54.221.93.187