DateTime comparison to fixed values - futures io
futures io futures trading



DateTime comparison to fixed values


Discussion in EasyLanguage Programming

Updated by ABCTG
    1. trending_up 363 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

(If you already have an account, login at the top of the page)

 
Search this Thread
 

DateTime comparison to fixed values

(login for full post details)
  #1 (permalink)
Encinitas
 
 
Posts: 4 since Jan 2019
Thanks: 0 given, 0 received

Suppose I only want my EL strategy to trade between two fixed times. In PST these times are 0630 and 1245. How do I compare the current time to these values?

My current code:

Inputs:
TimeBegin(630),
TimeEnd(1245);

if CurrentTime > TimeBegin and CurrentTime < TimeEnd then begin
{ trade logic here}
end
else begin
{no trading}
end;

Will this work or must I somehow convert CurrentTime to an integer? For BeginTime, must I specifiy it as 0630 rather that 630?

Please explain. Thanks.

Reply With Quote

Can you help answer these questions
from other members on futures io?
ATR of only green candles
EasyLanguage Programming
Stacked Imbalances.
Sierra Chart
Webinar: Linda Bradford Raschke Dealing with August burnout and Trader Camaraderie
The Elite Circle
Metastock Xenith Adapter
NinjaTrader
GBP/ARS Pair
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Excited and scared at the same time
13 thanks
What Is the Source of Your Edge??
12 thanks
CME to launch Nasdaq-100 Volatility Index (VolQ) futures
12 thanks
https://ivytrusts.com/ SCAM ALERT
11 thanks
financial transaction tax
10 thanks
 
(login for full post details)
  #3 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,192 since Apr 2013
Thanks: 385 given, 1,428 received


westofpluto,

CurrentTime is your computers clock at this very moment, using the reserved word Time that gives you the time of the bar might be better suited for your purpose.
A conversion wouldn't be necessary and using 0630 or 630 should make no difference.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > DateTime comparison to fixed values


January 28, 2019


Upcoming Webinars and Events
 

Dealing with burnout w/Linda Bradford Raschke

Elite only
     



Copyright © 2020 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