Open and close trade on a given time

Moderator: admin

Open and close trade on a given time

Postby jacklrfx » Thu Sep 29, 2016 5:25 am

Hi,
I have tried to write a strategy that enter in a trade at a given hour (for example enter at market in a CFD at 8:00 (morning), and stay in the market, till 16:00 (aftrnon). No stops, no limit, only enter in the market and stay, when it is 16:00 pm close the position opened. Possibility to choose the amount of trade in lots, or in percentual of the balance of the account.

This is what I have but there is something wrong.
Please give me help.
Attachments
Strategy Template.lua
(17.22 KiB) Downloaded 784 times
jacklrfx
 
Posts: 63
Joined: Mon Apr 20, 2015 2:40 pm


Re: Open and close trade on a given time

Postby jacklrfx » Tue Oct 04, 2016 3:01 pm

Thanks.
I have tested it but I don't set is correctly.
What I would like to do is:

open a long trade at 16:00:00 NYC time
close the long trade at 04:00:00 (of the next day) NYC time

so I am confused about what time set up on the strategy..
jacklrfx
 
Posts: 63
Joined: Mon Apr 20, 2015 2:40 pm


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 8 guests