Code to increment every two hours. - EasyLanguage Programming | futures io social day trading
futures io futures trading


Code to increment every two hours.
Updated: Views / Replies:1,236 / 6
Created: by onava 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
 

Code to increment every two hours.

  #1 (permalink)
Trading Apprentice
London/England, Zurich/Switzerland
 
Futures Experience: None
Platform: all
Favorite Futures: Tambourine
 
Posts: 20 since Apr 2012
Thanks: 2 given, 1 received

Code to increment every two hours.

HI all.

I was wondering how to i increment time to do something every 2 hours as easylanguage on has the function hour. I tried

if hour(t) > hour(t[2]) then
..

but that doesnt work. any ideas anyone ?

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
Reno, Nevada
 
Futures Experience: Advanced
Platform: NinjaTrader
Favorite Futures: ZN, ZB, FDAX
 
phantomtrader's Avatar
 
Posts: 158 since May 2011
Thanks: 13 given, 226 received

Assigning Time Limits


I have time limitations in my strategies although not as often as 2 hours. This is what I use:

Inputs: time1(630), time2 (930);

If time >= time1 and time <= time 2 then begin

Put conditions for trade here;

end;

Depending how many 2 hour periods you want segregated, you could repeat this process assigning new times i.e. time3, time4. It's almost like writing the same strategy multiple times unfortunately. There may be an easier way and you might also ask on the TS forum for help.

Reply With Quote
 
  #4 (permalink)
Trading Apprentice
London/England, Zurich/Switzerland
 
Futures Experience: None
Platform: all
Favorite Futures: Tambourine
 
Posts: 20 since Apr 2012
Thanks: 2 given, 1 received

i definitely dont want to repeat for every 2 hours the code below.. I think i need some kind of loop or something like below. can anyone help on this. thanks

for counter =0 to hour(t) = 24 then begin

( do stuff)

counter = counter +2;






phantomtrader View Post
I have time limitations in my strategies although not as often as 2 hours. This is what I use:

Inputs: time1(630), time2 (930);

If time >= time1 and time <= time 2 then begin

Put conditions for trade here;

end;

Depending how many 2 hour periods you want segregated, you could repeat this process assigning new times i.e. time3, time4. It's almost like writing the same strategy multiple times unfortunately. There may be an easier way and you might also ask on the TS forum for help.


Reply With Quote
 
  #5 (permalink)
Trading Apprentice
London/England, Zurich/Switzerland
 
Futures Experience: None
Platform: all
Favorite Futures: Tambourine
 
Posts: 20 since Apr 2012
Thanks: 2 given, 1 received

up




onava View Post
i definitely dont want to repeat for every 2 hours the code below.. I think i need some kind of loop or something like below. can anyone help on this. thanks

for counter =0 to hour(t) = 24 then begin

( do stuff)

counter = counter +2;


Reply With Quote
 
  #6 (permalink)
Elite Member
GER
 
Futures Experience: Advanced
Platform: MC
Favorite Futures: ES
 
Posts: 144 since May 2011
Thanks: 11 given, 211 received

You could use Mod, ie to plot a histogram every 2 hours on a 5 minute 24 h chart use :

If Mod(Time,200) = 0 then plot1 (1);

Reply With Quote
 
  #7 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,527 since Apr 2013
Thanks: 229 given, 853 received
Forum Reputation: Legendary

This might work for you, too:

 
Code
Inputs:
	ResetMinutes		(120);

Variables:
	ResetCounter		(0),
	NewResetTime		(0);

if Time > NewResetTime then
begin
	NewResetTime = TimeToMinutes(Time) + ResetMinutes;
	NewResetTime = MinutesToTime(NewResetTime);
	
	ResetCounter += 1;
end;

Plot1(ResetCounter, "ResetCounter");
Hope this helps,
ABCTG

Reply With Quote

Reply



futures io > > > > > Code to increment every two hours.

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
need a coder to code new NT7 indi from existing MT4 indi - I have source code traderdp Hire a Consultant or Programmer 0 January 31st, 2013 09:21 PM
Trading After Hours ligfing The Elite Circle 4 November 2nd, 2012 04:03 PM
After-hours Trading benharrell Traders Hideout 12 August 20th, 2010 11:24 AM
A few points in first one to 1.5 hours? Nimble The Elite Circle 4 July 28th, 2010 08:58 PM
Market Hours LukeGeniol Help, Tutorials, and How-Tos 0 July 8th, 2010 08:09 PM


All times are GMT -4. The time now is 02:44 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-12 in 0.09 seconds with 31 queries on phoenix via your IP 54.90.207.75