Topic: Exit the market at the end of the week?

Hello,
I have this strategy generated by FSB. The closing point is at the end of the week and the closing logic is based on the osc of momentum crossing the zero line upwards or downwards depending if the order is a long or short one. Looking at the chart it doesn't make any sense, there are orders closing in the middle of the week (the strategy doesn't have any "permanent loss limitation" so, there isn't any reason to close the position on the middle of the week. Also, the take profits is very far away (1000 pips). On top of all that, the oscillator doesn't cross the zero line on the bar it closes,
I have checked the forum and "by the end of the week" the general consensus is the last bar on Friday after the 23  hour. Right? or it isn't?
How the software deals with this, if at the end of the week the logic condition isn't met, what happens? The position is carried over the week-end? or it just closes the position even if the logic condition isn't met? In this case no positions is carried over the week-end. However, all the orders are closed way before the "end of the week" condition, some times several days in advance, otheron the Friday , but in early hours.
Can somebody explain what takes more weight ? the end of the week or the osc crossing the zero line?

Re: Exit the market at the end of the week?

i4xtoo wrote:

...
Can somebody explain what takes more weight ? the end of the week or the osc crossing the zero line?

If you have logical groups A and B for the closing indicators, I think it should be the osc crossing zero first, but if that does not happen by end of Friday, the end of week indicator closes position so does not go over the weekend.

If you do not have them in 2 logical groups, then both have to be met at the same time to close the position.

What indicator did you use? If it's Day of Week Exit, I made that last month. If there is a bug, I will fix it.

Could you post your strategy (the xml file)? This will help show what is happening.

Re: Exit the market at the end of the week?

Hi Krog, hope you can shed some light on this:
Strategy Overview
Forex Strategy Builder v2.56.4.0
Strategy name: GBPUSD-5-4-30-11
Date: 5/20/2011 5:01:46 PM

Table of Contents
Description
Logic
Environment
Strategy Properties
Indicator Slots
Statistic Information
Description
Automatically generated on 4/30/2011 2:01 PM.

Top

Logic
Opening (Entry Signal)
Open a new long position or add to an existing position at the Lower Band of Starc Bands* (Smoothed, Close, 62, 2.52).

Open a new short position or add to an existing position at the Upper Band of Starc Bands* (Smoothed, Close, 62, 2.52).

Closing (Exit Signal)
Close an existing long position at the end of the week when the following logic condition is satisfied:

the Oscillator of Momentum (Smoothed, Open, 110, 48) crosses the zero line upward.
Close an existing short position at the end of the week when the following logic condition is satisfied:

the Oscillator of Momentum (Smoothed, Open, 110, 48) crosses the zero line downward.
Handling of Additional Entry Signals**
Entry signal in the direction of the present position:

Add to the position no matter if it is at a profit or loss. Do not exceed the maximum allowed number of lots to open.
Entry signal in the opposite direction:

No modification of the present position is allowed. Cancel any additional orders which are in the opposite direction.
Trading Size
Trade percent of your account.

Opening of a new position - 0.1% of the account equity.
Adding to a position - 0.1% of the account equity. Do not open more than 19.88 lots.
Permanent Protection
The strategy does not provide a permanent loss limitation.

The Permanent Take Profit closes a position at 1000 pips profit.

--------------
* Use the indicator value from the previous bar for all asterisk-marked indicators!
** The averaging rules apply to the entry signals only. Exit signals close a position. They cannot open, add or reduce one.

Top

Environment
Market
Symbol - GBPUSD
Time frame - 5 Minutes

Account
Initial account - 1000.00 USD
Lot size - 10000
Leverage - 1/50
Required margin - 20.00 USD* for each open lot

Charges
Spread - 20 pips (2.00 USD*)
Swap number for a long position rollover - 2 pips (0.20 USD*)
Swap number for a short position rollover - -2 pips (0.20 USD*)
Commission per lot at opening and closing - 0 pips (0.00 USD*)
Slippage - 0 pips (0.00 USD*)

--------------
* This value may vary!

Top

Strategy Properties
Handling of Additional Entry Signals
Next same direction signal behavior - Adds to the position
Next opposite direction signal behavior - Does nothing

Trading Size
Trade percent of your account. The percentage values show the part of the account equity used to cover the required margin.

Maximum number of open lots - 19.88
Number of entry lots for a new position - 0.1% of the account equity
In case of addition - number of lots to add - 0.1% of the account equity
In case of reduction - number of lots to close - 0.1% of the account equity

Permanent Protection
Permanent Stop Loss - None

Top

Indicator Slots
The slots show the logic for the long positions only. Forex Strategy Builder automatically computes the proper logic for the short positions.

Strategy Properties
Same direction signal - Add
Opposite direction signal - Nothing
Permanent Stop Loss - None
Permanent Take Profit - 1000
Opening Point of the Position
Starc Bands
Enter long at the Lower Band
Smoothing method - Smoothed
Base price - Close
MA period - 62
Multiplier - 2.52
Use previous bar value - Yes
Closing Point of the Position
Week Closing
Exit the market at the end of the week
Base price - Close
Closing Logic Condition
Oscillator of Momentum
The Oscillator crosses the zero line upward
Smoothing method - Smoothed
Base price - Open
Momentum1 period - 110
Momentum2 period - 48
Use previous bar value - No

Top

Statistic Information
Market Account
Symbol GBPUSD Intrabar scanning Not accomplished
Period 5 Minutes Interpolation method Pessimistic scenario
Number of bars 20000 Ambiguous bars 1
Date of updating 04/26/11 Tested bars 19840
Time of updating 14:40 Initial account 1000.00 USD
Date of beginning 01/18/11 Account balance 2006.53 USD
Time of beginning 00:40 Minimum account 1000.00 USD
Minimum price 1.57498 Maximum account 2006.53 USD
Maximum price 1.65976 Maximum drawdown 0.00 USD
Average Gap 1 pips Max equity drawdown 245.94 USD
Maximum Gap 773 pips Max equity drawdown 13.75 %
Average High-Low 69 pips Gross profit 1006.53 USD
Maximum High-Low 917 pips Gross loss 0.00 USD
Average Close-Open 36 pips Sent orders 97735
Maximum Close-Open 889 pips Executed orders 2018
Maximum days off 2 Traded lots 38.2000000000004
Maximum data bars 20000 Winning trades 32
No data older than No limits Losing trades 0
No data newer than No limits Win/loss ratio 1.00
Fill In Data Gaps Switched off Time in position 93 %
Cut Off Bad Data Switched off Charged spread 39.72 USD
  Charged rollover 10.28 USD
  Charged commission 0.00 USD
  Charged slippage 0.00 USD
  Total charges 50.00 USD
  Balance without charges 2056.53 USD
  Account exchange rate Not used

Top

Re: Exit the market at the end of the week?

http://s2.postimage.org/416q6b38/screen.jpg

Re: Exit the market at the end of the week?

That was a print screen of the chart, there is an order closed on Thursday 4/14/2011 @ 6:15, just before that there were several times the osc crossed the zero line. What triggered the closing on Thursday?

Re: Exit the market at the end of the week?

Week ending is a built-in indicator, it should exit at the last bar of Friday. But using it by itself, your strategy with no Starc Bands, I see it close it at unexpected times all through the week.
????
I don't know, I'm looking at this and I can't tell why it does this. It might work better removing "Same Direction Signal - Add", change to nothing.
Since Week Ending is a Close slot, cannot use logical groups with it.  If you use it with another closing indicator, then you have to get the indicator plus be last bar of Friday. I've tried this, it's very rare, only exits once in 4 months of data.
Sorry I could not help more.

Re: Exit the market at the end of the week?

Krog,
The problem is that this strategy was generated by FSB, I didn't modified it in any way. Thats only mean a bug in the generator. I hope this could be addressed by Popov since I was thinking to get the strategies generated by FSB and then "translate" it to MT4. Anyway, I really appreciate your help.
Have a nice Week-End.
i4xtoo

Re: Exit the market at the end of the week?

5 digit data means that your 1000 TP is 100 pips, max setting is 5000 (500 pips), try it and mark the difference, if it appears.

Re: Exit the market at the end of the week?

Thanks footon,
You are right, the T/P at 100 pips were closing the positions. I uncheck the take profit, and now if there isn't any crossing zero line at the end of the week, it is carried over the week-end. Too risky. Well I'm glad the probles wasn't FSB.