Using Date & Time

4 replies

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

8 years ago #113666

Hello,

 

I’m trying to have my EA start trading on a certain day and then stop trading on another day. 

Example: 

 

Start trading on 20/04/2015 @ hour:10

End Trading on 23/04/2015 @ hour:20

 

I have the start trading correct I think but the end trading is what I’m stuck on. Please let me know how I would write it to end trading on at the right time.

 

Thank you for your time.

 

Regards,

 

James

0

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

8 years ago #130266

Is anyone have information on how to have the EA to start trading on a specific day and stop trading two days later.

 

Example:

 

Start Trade: 11/5/2015  

Hour: 12

Minute:0

End Trade: 13/5/2015

EndHour: 15

EndMinute:0

 

 

Thanks for any help.

 

James

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

8 years ago #130280

You can use TimeCurrent and DateCurrent to get actual time of a last bar and limit order entry. See attached example. It simply enters the market at time you specified and exits two days later.

0

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

8 years ago #130283

Thank you tomas262. I’m trying to use variables so I can set up the EA to run through out the month, turning on certain days and times. I think I know what I need to do to get it working correctly. Thanks again for your replay and help. It is much appreciated. 

 

Regards,

 

James

0

ssdex

Customer, bbp_participant, community, 99 replies.

Visit profile

8 years ago #130284

tomas262,

 

Quick question. 

 

I’m looking for the EA to start looking for the coded trade setup at a certain time and date. I am looking for the EA to stop looking for the coded trade setup on a certain time and date. 

 

I’m a little confused looking at the example you posted. I don’t want the trade to exit on a certain date and time but to stop looking for the setup.

 

I’m trying to use variables so that I can set the date and time at the beginning of the week for each currency pair being traded. Sorry for the lack of my understanding of the software. 

 

Thanks again for any help.

 

 

Regards,

 

James

0

Viewing 4 replies - 1 through 4 (of 4 total)