Trading Articles
Article Categories
Article Tools
What is wrong with my code?
Updated June 17, 2019
trending_up
785 views
thumb_up
0 thanks given
group
2 followers
forum
6 posts
attach_file
0 attachments
Welcome to futures io: the largest futures trading community on the planet, with well over 125,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)
What is wrong with my code?
(login for full post details)
#1 (permalink )
Canicattė Italy
Posts: 15 since Nov 2018
Thanks: 0 given,
0
received
Hello everyone, i'm not very expert with Easylanguage . I don't understand what's wrong with this code by which to compare the date of tomorrow with that of a holiday.
Anyone have any suggestions?
Regards
Code
if DayOfWeek(Date) = thursday and (currentdate +1) =1180330 then
nextBusinessDay = JulianToDate(DateToJulian(Date) + 4)
Can you help answer these questions from other members on futures io?
Best Threads (Most Thanked) in the last 7 days on futures io
(login for full post details)
#3 (permalink )
Posts: 2,230 since Apr 2013
Thanks: 409 given,
1,471
received
cactus1973,
what is the rational for using "currentdate" within this code?
Regards,
ABCTG
(login for full post details)
#4 (permalink )
Canicattė Italy
Posts: 15 since Nov 2018
Thanks: 0 given,
0
received
what I would like to write with this code is: " if today is thursday and tomorrow's date is equal to 1180330 then nextbusinessday .... "
(login for full post details)
#5 (permalink )
Posts: 2,230 since Apr 2013
Thanks: 409 given,
1,471
received
cactus1973,
currentdate is your computer's current date, it is not the date of the current bar. You can use Date instead and add days to it. However keep in mind that you are dealing with dates in EasyLanguage format.
Take a look at the built-in CalcDate function to find out how to add days to dates in EasyLanguage format.
Regards,
ABCTG
(login for full post details)
#6 (permalink )
Canicattė Italy
Posts: 15 since Nov 2018
Thanks: 0 given,
0
received
ABCTG,
thank you for your suggestion, i've solved with the correction below :
Code
if DayOfWeek(Date) = thursday and (CalcDate(date,1)) = 1180330 then
nextBusinessDay = JulianToDate(DateToJulian(Date) + 4)
Regards
(login for full post details)
#7 (permalink )
Posts: 2,230 since Apr 2013
Thanks: 409 given,
1,471
received
cactus1973,
you are welcome. I am glad to hear that you got it working.
Regards,
ABCTG
cactus1973
ABCTG,
thank you for your suggestion, i've solved with the correction below :
Code
if DayOfWeek(Date) = thursday and (CalcDate(date,1)) = 1180330 then
nextBusinessDay = JulianToDate(DateToJulian(Date) + 4)
Regards
Last Updated on June 17, 2019
Right now
Ongoing
Right now
March
Register to Attend
Elite only
Coming soon
April