How to automatically close trades before Weekend

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Re: How to automatically close trades before Weekend

Postby LordTwig » Mon Nov 04, 2013 10:16 pm

Any developments on this yet?????
Cheers
LordTwig
LordTwig
FXCodeBase: Confirmed User
 
Posts: 157
Joined: Fri Mar 12, 2010 3:15 am

Re: How to automatically close trades before Weekend

Postby Valeria » Tue Nov 05, 2013 11:00 am

Hi LordTwig,

You can use method core.isnontrading.
Please note, that this method identifies only weekend, not holidays and other not standard trading breaks.
Valeria
 

Re: How to automatically close trades before Weekend

Postby LordTwig » Wed Nov 06, 2013 12:20 am

Hi Valeria,
I don't think it is as easy as what you suggest.
Perhaps you upload some working strategy that produces this result 'closing trades before the weekend starts' :)
Valeria wrote:Hi LordTwig,

You can use method core.isnontrading.
Please note, that this method identifies only weekend, not holidays and other not standard trading breaks.


Apprentice has the assumption that it is quite difficult to achieve.... his quote below....
Apprentice wrote:Specialized strategy can be writen.
Implementation is not simple.
Existing STRATEGY should be re-written.
Cheers
LordTwig
LordTwig
FXCodeBase: Confirmed User
 
Posts: 157
Joined: Fri Mar 12, 2010 3:15 am

Re: How to automatically close trades before Weekend

Postby sunshine » Thu Nov 14, 2013 1:16 am

Hi LordTwig,

LordTwig wrote:Perhaps you upload some working strategy that produces this result 'closing trades before the weekend starts' :)

Unfortunately there is no such an example. Actually there is no good solution. Theoretically we can write a code, which will close all trades by timer. For example, market closes at 04:55 PM on Friday and the strategy will close all positions some time before this, e.g. 10 min. But nobody can guarantee that it will work, may be positions will not be closed because of low liquidity.
sunshine
 

Previous

Return to Discussions

Who is online

Users browsing this forum: No registered users and 7 guests