Signal Time de/activator [SOLVED]
-
- Posts: 18
- Joined: 06 Jun 2016
Signal Time de/activator
How do i write a code so my signal can function between set time periods of the day for example i want my signal to function between 8 am and 3 pm and to close the trade its in at 30 pm and stop trading until the next day at 8am again.
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: Signal Time de/activator [SOLVED]
How do i write a code so my signal can function between set time periods of the day for example i want my signal to function between 8 am and 3 pm and to close the trade its in at 30 pm and stop trading until the next day at 8am again.
See post #15
[FAQ] Limit the Time of Autotrade
viewtopic.php?f=16&t=10811
-
- Posts: 18
- Joined: 06 Jun 2016
Re: Signal Time de/activator
if time >= start.time
and time <= end.time then
BEGIN
if var0 crosses above botBand then buy next bar at market;
if var0 crosses below topBand then sellshort next bar at market;
END;
how do i get it to close the trade when time expires?
and time <= end.time then
BEGIN
if var0 crosses above botBand then buy next bar at market;
if var0 crosses below topBand then sellshort next bar at market;
END;
how do i get it to close the trade when time expires?
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: Signal Time de/activator
If you are new
and want to learn more about programming your own strategy,
you should take a look at other threads in the forum.
eg. this one is next to your thread:
viewtopic.php?f=1&t=49850
and want to learn more about programming your own strategy,
you should take a look at other threads in the forum.
eg. this one is next to your thread:
viewtopic.php?f=1&t=49850