how do i create this strategy? - NinjaTrader Programming | futures io social day trading
futures io futures trading


how do i create this strategy?
Updated: Views / Replies:2,080 / 8
Created: by kaywai 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
 
Thread Tools Search this Thread
 

how do i create this strategy?

  #1 (permalink)
Trading for Fun
singapore
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: IB
Favorite Futures: ES, forex, oil
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

how do i create this strategy?

Hi,

Need some help trying to create this strategy.

1) To determine the high and low of the first 30 mins of trading day and to use them as the day's support and resistance.
2) To initiate a long if a higher high is greater than the high that was determined in the first 30 minutes and to initiate a short if a lower low is lesser than the low that was determined first 30 mins of the trading day.

i can't get the high and low of the first 30 minutes to be the boundaries for use throughout the day. by that i mean, the high and low keeps on moving as we move through the trading day. and i am using 1 minute charts.

Reply With Quote
 
  #2 (permalink)
Elite Member
Frankfurt
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 917 received

hallo kaywai,
welcome to our forum !

max-td
Reply With Quote
 
  #3 (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,573 given, 3,982 received


Maybe something like:
 
Code
                            
private int endPeriod 100000;
private 
int _H;
private 
int _L;
protected 
override void OnBarUpdate()
{
if (
ToTime(Time[0]) < endPeriod
  return;
if (
ToTime(Time[0]) == endPeriod) {
  
_H=HighestBar(HighBars.BarsSinceSession 1);
  
_L=LowestBar(LowBars.BarsSinceSession 1);}
  return;
if (
High High[_H])
  
EnterLongDefaultQuantity,"");
if (
Low Low[_L])
  
EnterShortDefaultQuantity,"");
  

_H/_L stores the bar number which had the higher high/lower low before 10:00 am (I assume we are here working on the ES cash session, in NY timezone, and the start session is defined at 09:30 am)

Not tested...

Success requires no deodorant! (Sun Tzu)

Last edited by sam028; December 2nd, 2009 at 09:57 AM. Reason: logic errors in my example, found by max-td ;)
Reply With Quote
 
  #4 (permalink)
Trading for Fun
singapore
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: IB
Favorite Futures: ES, forex, oil
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Sam, Thx for your help. Getting an "error on generating strategy message, and being a noob at programming doesn't help! Let me show you what I've done and you can point out what I've done wrong.

{
#region
privateint endPeriod = 081500;
privateint _H;
privateint _L;
#endregion
}
protectedoverridevoid OnBarUpdate()
{
if (ToTime(Time[0]) < endPeriod)
return;
if (ToTime(Time[0]) == endPeriod) {
_H=HighestBar(High, Bars.BarsSinceSession -
1);
_L=LowestBar(Low, Bars.BarsSinceSession -
1);}
return;
if (High > High[_H])
EnterLong(_H + TickSize);
if (Low < Low[_L])
EnterShort(_L - TickSize);
}

Reply With Quote
 
  #5 (permalink)
Trading for Fun
singapore
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: IB
Favorite Futures: ES, forex, oil
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Thanks for the welcome Max. Hopefully one day I can contribute. Right now, I'm a noob!

Reply With Quote
 
  #6 (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,573 given, 3,982 received

You may create a basic strategy with the wizard, then edit the .cs an make your own modification.
If you had removed the space char between private and int, for example, well it's not going to work...



Success requires no deodorant! (Sun Tzu)
Reply With Quote
 
  #7 (permalink)
Trading for Fun
singapore
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: IB
Favorite Futures: ES, forex, oil
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

sorry dude. thx again

Reply With Quote
 
  #8 (permalink)
Trading for Fun
singapore
 
Futures Experience: Intermediate
Platform: ninjatrader
Broker/Data: IB
Favorite Futures: ES, forex, oil
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Hi Jeff, Try this

Attached Files
Register to download File Type: zip CTOD.zip (1.2 KB, 26 views)
Reply With Quote
 
  #9 (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


sam028 View Post
You may create a basic strategy with the wizard, then edit the .cs an make your own modification.
If you had removed the space char between private and int, for example, well it's not going to work...



This is just from pasting into the forum, you need to wrap code around either the [ code ] or [ php ] blocks so it doesn't word wrap or improperly format.

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 > > > > > how do i create this strategy?

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
VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy Big Mike MultiCharts 39 November 9th, 2017 04:35 AM
VIDEO TUTORIAL: How to create an advanced NinjaTrader Strategy Big Mike NinjaTrader 63 November 6th, 2016 03:25 PM
How to create Your Journal benbrooke Beginners and Introductions 1 February 7th, 2010 08:16 PM
VIDEO TUTORIAL: How to create an advanced NinjaTrader Strategy Big Mike NinjaTrader Programming 0 January 26th, 2010 06:22 AM
Create this indicator Zoethecus NinjaTrader Programming 16 November 16th, 2009 07:56 PM


All times are GMT -4. The time now is 02:37 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