NEED HELP TO WRITE MY FIRST STRATEGY - NinjaTrader Programming | futures io social day trading
futures io futures trading


NEED HELP TO WRITE MY FIRST STRATEGY
Updated: Views / Replies:491 / 2
Created: by benwincky Attachments:0

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
 

NEED HELP TO WRITE MY FIRST STRATEGY

  #1 (permalink)
benwincky
Brussels Belgium
 
Futures Experience: Beginner
Platform: Ninjatrader
Broker/Data: GAINCAPITAL/Forex.com
Favorite Futures: Forex
 
Posts: 14 since Mar 2013
Thanks: 5 given, 0 received

NEED HELP TO WRITE MY FIRST STRATEGY

Hello to you

I can manipulate my edit script by now

But I'm nowhere, let's be honnest. There are so many commands that you would save me time indicating me whitch set of command I could Start with for my first «own scrpit*»

I read a lot in the forum but didn't find what I want or maybe came accross without noticing that was the command Iwas looking for.

I will give and example I think this is the best way

I intend working this way

protected override void Initialize()
{

CalculateOnBarClose = False;
}

I'm not interested in bars closed though I know it is CPU intensive

I have the EURJPY a 120,55

I will write this example for a long entry but the logic would be the same if I would go short

As I enable my strategy, I want this 120,55 value stored in a «*double*» variable

(This is my first problem, I have been unable to find a way for doing so)


Let's say The EURJPY moves up 1 pip up to 120,56

At time I want to start a stop watch to 0 second


First case

The EURJPY moves up 4 more pips to 120,60 within 3 seconds, I would enter long

Second Case

3 seconds have elapsed and the EURJPY moved up to 120,59

It didn't fill my condtions to enter long and the stop watch resets to Zero

Third Case

The EURJPY went up to 120,58 and then back down to 120,57. Well, it didn't fill my conditions either

But....

It might be a new begining of a short entry process

I went down one pip, didn't he*?

I now want the 120,58 stored in my double Variable and restart a stop wath to Zero

And If the EURJPY moved down within 3 second I enter Short.

TO REPHASE THIS IN SHORT

1. How to I do To get the Actual Value of the EURJPY in a variable as I start my strategy.
2. How do I start a stop watch

Thanks in advance



Benwinckelmans

Reply With Quote
 
  #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
NC, USA
 
Futures Experience: None
Platform: None Yet
Favorite Futures: Guitar
 
MrYou's Avatar
 
Posts: 403 since Jun 2011
Thanks: 618 given, 193 received


My suggestion is to forget about this "stop watch" stuff. You need to understand how charts and NinjaScript work. I can't explain it all, but below is some simple code.

Add() a 3 second chart or base your primary bars (BarsInProgress == 0) off the 3 second chart.

CalculateOnBarClose = true;

 
Code
if (BarsInProgress == 0)
{
   if (Close[0] - Open[0] > TickSize * 3)
     EnterLong();
}
OR for Multi-Timeframe: Add(PeriodType.Second, 3)

 
Code
if (Closes[1][0] - Opens[1][0] > TickSize * 3)
  EnterLong();

Reply With Quote
The following user says Thank You to MrYou for this post:

Reply



futures io > > > > > NEED HELP TO WRITE MY FIRST 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
What is the best way to write a NT strategy with the wizard? mkaminski NinjaTrader 2 October 21st, 2012 01:43 PM
Need Programmer to Write Ninja Strategy hcoffin1941 NinjaTrader Programming 28 November 21st, 2011 09:44 AM
Italy-Pregnant BlackRock Sees Write-Downs Of 75-80% For Greece, Portugal And Ireland Quick Summary News and Current Events 0 November 14th, 2011 12:30 PM
How do I write a trading plan? skyfly Traders Hideout 5 May 20th, 2011 02:13 AM
How do I write the script for kaywai NinjaTrader Programming 1 January 19th, 2010 11:06 AM


All times are GMT -4. The time now is 06:13 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-17 in 0.08 seconds with 19 queries on phoenix via your IP 54.82.81.154