Topic: How does FSB manipulate orders.

How does FSB manipulate orders?

Forex Strategy Builder uses a mathematic model of the trading process. It imitates the real communication between the trader,the trading platform and the broker.

Forex Strategy Builder V 2.3.3.0 Beta
Strategy name: PSB_v01
Exported on: 7/2/2007 00:47:11

Market: EURUSD 1 Day
Spread: 4 pips
Swap Number: 3 pips

Balance: 7873 pips
Minimum account: 0 pips
Maximum drawdown: 785 pips
Time in position: 39 %

The same direction signal  - does Nothing
The opposite direction signal - Reverses the position

[Open] Moving Average
     Logic The Price Open is lower than the MA value.
     Smoothing Method Weighted
     Base Price Close
     Period 10
     Shift 0
     Use previous bar value True

[Close] Moving Average
     Logic The Price Buy is higher than the MA value.
     Smoothing Method Weighted
     Base Price Open
     Period 10
     Shift 0
     Use previous bar value False
---
In this strategy:
We enter on a market when the price reaches the MA (Weighted, Price Close, 10) only when the conditions are satisfied:

The Price Open is lower than the MA value. MA (Weighted, Price Close, 10)
Use previous bar value True
And
The Price Buy is higher than the MA value.
MA (Weighted, Price Open, 10)
Use previous bar value False

The first condition means: the bar opens below the value of previous bar MA. Why the previous bar? Because we have to send the order at the beginning of the bar and we do not know the current bar MA yet (MA is calculated on the ?price close?). Using the previous bar value means that we take the value from the last second (theoretically the current bar opening is at the same time as the previous bar closing).
The second condition means that the buying price is higher then the current MA value. The buying price is the value of the first MA. Because the MA uses opening price, it we can use the current value.

Buy at: MA1
When:   Bar Opening < MA1 and MA1 > MA2
Or
Sell at: MA1
When:   Bar Opening > MA1 and MA1 < MA2

The orders:
Pending order Buy, Stop, 1 lot, order price ? MA1
Or
Pending order Sell, Stop, 1 lot, order price ? MA1


The position will be closed when the market reaches the MA (Weighted, Price Open, 10) value.

Close at: MA2

?The same direction signal - does Nothing? means that we cannot add to the current position.

Because of ?The opposite direction signal - Reverses the position? when we are long ( for an example 1 lot) and there is a sell signal the FSB will send Sell order 2 lots in order to close the current position and to open a new one in the opposite direction.

An interesting point is that, this strategy limits the losses.
This is because we can open a long position only when the buying price is greater than the MA2 and we have to close when the price falls to the MA2. The closing point ? MA2 is always under the position price and limits the loss.
For the short position, the MA2 is always above the position.


When the opening conditions are satisfied FSB always sends two orders ? the first is an entry order to open the position and the second is a stop ?if? order to close it. ?If? order means that it will be activated when the targeted order (the first one) is executed. If the first order is canceled, the second one will be canceled too. 

When the position is not closed to the end of the bar, it will be transferred to the next bar. The old stop order will be canceled and a new one will be send, pointing the new MA2 value.

Let see the situation when we have a position and there is an opposite signal.
The position is transferred from the previous bar.
We are Long 1 lot.
FSB sends a stop order ? price MA2, 1 lot. - This is the stop order for closing the current position.
After that FSB sends ? Sell stop MA1. 2 lots. - To reverse the current position.
In addition: Buy stop MA2, ?IF? order. - This one will be activated after the reversing.

Here we have two possibilities:
   1. The market reaches the MA1 first. The initial position will be reversed to short and the stop order for it will be activated.
   2. The market reaches the MA2 value. The initial position will be closed. After that if, the market touch the MA1 value, a new short position (2 lots) will be opened with a stop at MA2.