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

How to automatically close trades before Weekend

Postby LordTwig » Tue Jun 26, 2012 10:24 am

Hi there,

How can we get a strategy to close trades just before the end of trading day before weekends?
So we can limit risk by not holding open trades over weekends.

Is there a coding that can detect the end of days? End of week?
Like a candle before it is the end of week.
if so what is it?
How to implement it?

If there is an easy way to do this in strategy, then maybe someone can take any small easy strategy and show how it is done for us.

Many thanks
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 LordTwig » Wed Jun 27, 2012 4:53 am

Hi Apprentice,
Apprentice wrote:U can try to use Time close Strategy.
viewtopic.php?f=31&t=13319&p=25920&hilit=close#p25920

Had a look but cannot see anything in code that fortells end of tradeday or end of the trading week.

I already have in my strategy a close trade by time option but 4 days of the week (Mon - Thurs) the trading day ends at 17:00 but 5th day (Friday) ends at 16:00.

Also you have long weekends and holidays to consider as well

Surely their must be some kind of signal that can alert trading finished.

What about using Nontradingday & NontradingWeekend somehow but in reverse :?:

Or can TS2 be upgraded to include a feature like this :?:
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 LordTwig » Wed Feb 27, 2013 7:09 am

Hi there,

Has there been any recent developement on this subject?

I am still after an effient (automatic) way to close trades at the end of tradeing before the Weekend (say....last 2 minutes of trading)

This also to include closing trades before reconised Holidays.

Can we know the time and date before the next candle?
or would this be a non trading day Candle......?

Cannot MarketScope2 price feed have incorporated a signal (somhow) to represent the end of the trading day,
or the end of the trading week......??
If this can be done, can this signal be made to signal a couple of minutes or candle before it does, so trades can be opened or closed before the end of the trading day?
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 Apprentice » Wed Feb 27, 2013 8:13 am

At this time, we can write specialized strategy for this task.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: How to automatically close trades before Weekend

Postby LordTwig » Wed Feb 27, 2013 9:13 am

Apprentice wrote:At this time, we can write specialized strategy for this task.


Hi Apprentice, so can we get this specialized strategy coded?

Will it include closing trades just before,
1) Weekends

2) Holidays

3) Tradings days (ie; each FXCM trading day finishes at 5:00 pm)

Will it be easy to incorporate it into existing strategies?

Thanks for your quick reply
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 Apprentice » Thu Feb 28, 2013 4:23 am

Specialized strategy can be writen.
Implementation is not simple.
Existing STRATEGY should be re-written.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: How to automatically close trades before Weekend

Postby LordTwig » Thu Feb 28, 2013 5:46 am

Apprentice wrote:Implementation is not simple.


So can TS2 be upgraded to include a signal somhow to show these 'end of day', 'end of week' or 'holidays' .... before they happen :?:

Rather than everyone having to write a complicated code into their strategy's to do this.
I see that these are a common issue amonst traders and users of this forum.

We are after easy options not complicated ons :(
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 Apprentice » Fri Mar 01, 2013 4:58 am

As trades, I agree, as a programmer, any strategy will have some limitations;
It is impossible to anticipate all the needs of all trades within strategy.
It is better to have some kind of support from TS.
Will forwarded your request to development team.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: How to automatically close trades before Weekend

Postby LordTwig » Fri Mar 01, 2013 6:02 am

Can the next candle time and date be found before it arrives :?: ......So that maybe we could use that to find the weekend!


Apprentice wrote:Will forwarded your request to development team.

Thanks that would be great :)
Cheers
LordTwig
LordTwig
FXCodeBase: Confirmed User
 
Posts: 157
Joined: Fri Mar 12, 2010 3:15 am

Next

Return to Discussions

Who is online

Users browsing this forum: No registered users and 6 guests