Same condition every hour - NinjaTrader Programming | futures io social day trading
futures io futures trading


Same condition every hour
Updated: Views / Replies:1,156 / 5
Created: by rajafx1 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
 

Same condition every hour

  #1 (permalink)
Elite Member
Toronto
 
Futures Experience: Beginner
Platform: ninja
Favorite Futures: CL
 
Posts: 68 since Oct 2009
Thanks: 81 given, 3 received

Same condition every hour

For auto strategy, i want to know that I am working on price movement based strategy. I have condition for buy & sell working good, but if i need that every hour it should take trade based on one same condition. what code should i use for 8.30 then 9.30 then 10.30 & so on.For this i have to put the same code every time for every hour which is too lengthy .
Like for buy at
if (ToTime(Time[0]) == ToTime(8, 30, 0) ( this is for one trade at 8.30)
I want to now if one code is sufficient for multiple trades at different times like 9.30,then10.30 & so on .

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
Calcutta, India
 
Futures Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 259 received


you can try something like this.

in the variables put this

 
Code
private int timeint = 83000; //8:30AM

and this stuff in OnBarUpdate

 
Code
if (ToTime(Time[0]) == timeint)
{
       //do stuff

       //assign the next time
       timeint += 10000;
}
make a public property of timeint so that you can assign a value.

Reply With Quote
 
  #4 (permalink)
Elite Member
Toronto
 
Futures Experience: Beginner
Platform: ninja
Favorite Futures: CL
 
Posts: 68 since Oct 2009
Thanks: 81 given, 3 received


bukkan View Post
you can try something like this.

in the variables put this

 
Code
private int timeint = 83000; //8:30AM

and this stuff in OnBarUpdate

 
Code
if (ToTime(Time[0]) == timeint)
{
       //do stuff

       //assign the next time
       timeint += 10000;
}
make a public property of timeint so that you can assign a value.

i did not got it,
can u elaborate as i want it to run round the clock every hour with same condition.I mean repeat it every our with interval of 60 min for 24 hours.

Reply With Quote
 
  #5 (permalink)
Elite Member
Calcutta, India
 
Futures Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 259 received

ToTime(Time[0]) returns an integer. like if Time[0] equals 8:30 AM then the int value will be 83000

whenever the condition is fulfilled (i.e. ToTime(Time[0]) == 83000) you do your stuff (place order and whatever) and reset the int value (timeint) to the next time (by adding 10000, which is equivalant to one hour)

Reply With Quote
 
  #6 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

or just check that timeint % 10000 == 3000

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

Reply



futures io > > > > > Same condition every hour

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
computer alarm clock - audio 4 times per hour Todd The Elite Circle 11 May 31st, 2014 03:19 PM
to get NT to perform an action only once while a strategy condition is true richw NinjaTrader Programming 3 February 28th, 2011 09:38 PM
Hour Bars JustWondering Traders Hideout 3 December 10th, 2010 07:36 PM
Ninja Trader 24 hour market codes and time zone changes don10 NinjaTrader 5 November 23rd, 2010 05:55 PM
Strategy Condition Logic >> my wetware Trader.Jon NinjaTrader Programming 2 May 24th, 2010 05:17 PM


All times are GMT -4. The time now is 03:05 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-16 in 0.10 seconds with 19 queries on phoenix via your IP 54.163.209.109