Topic: Moving Averages In and out

I'm looking at the Moving Average of 3 bars, 50 bars and 25 bars. I would like to set up FSB to look for a 3 above 50 cross, then look for a complete high/low ABOVE the 50, then enter on the next opening bar. The close would be almost the opposite with the 3/25. The 3 cross below the 25, exit on close.

Any ideas how to set that up? I have tried what I know and it just doesn't look right.

For a short, would this automatically look for a 3 cross below the 50, next complete high/low below the 50 then enter?

Re: Moving Averages In and out

I don't really understand what you mean by "a complete high/low", I took it as a whole bar. Nevertheless this is what I came up with:

[Opening Point of the Position]
Bar Opening
     Enter the market at the beginning of the bar
     Base price  -  Open

[Opening Logic Condition]
Moving Averages Crossover
     [ A ]   The Fast MA crosses the Slow MA upward
     Base price  -  Close
     Fast MA method  -  Simple
     Slow MA method  -  Simple
     Fast MA period  -  3
     Slow MA period  -  50
     Fast MA shift  -  0
     Slow MA shift  -  0
     Use previous bar value  -  Yes

[Opening Logic Condition]
Moving Average
     [ A ]   The bar opens above the Moving Average
     Smoothing method  -  Simple
     Base price  -  Low
     Period  -  50
     Shift  -  0
     Use previous bar value  -  Yes

[Closing Point of the Position]
Bar Closing
     Exit the market at the end of the bar
     Base price  -  Close

[Closing Logic Condition]
Moving Averages Crossover
     [ a ]   The Fast MA crosses the Slow MA downward
     Base price  -  Close
     Fast MA method  -  Simple
     Slow MA method  -  Simple
     Fast MA period  -  3
     Slow MA period  -  25
     Fast MA shift  -  0
     Slow MA shift  -  0
     Use previous bar value  -  No

Again, if I understood you correctly, the strat above buys like you stated, so to make it behave correctly for sells, logical groups should be involved. Final version then:
[Opening Point of the Position]
Bar Opening
     Enter the market at the beginning of the bar
     Base price  -  Open

[Opening Logic Condition]
Moving Averages Crossover
     [All]   The Fast MA crosses the Slow MA upward
     Base price  -  Close
     Fast MA method  -  Simple
     Slow MA method  -  Simple
     Fast MA period  -  3
     Slow MA period  -  50
     Fast MA shift  -  0
     Slow MA shift  -  0
     Use previous bar value  -  Yes

[Opening Logic Condition]
Moving Average
     [ B ]   The bar opens above the Moving Average
     Smoothing method  -  Simple
     Base price  -  High
     Period  -  50
     Shift  -  0
     Use previous bar value  -  Yes

[Opening Logic Condition]
Long or Short
     [ B ]   Open short positions only

[Opening Logic Condition]
Long or Short
     [ A ]   Open long positions only

[Opening Logic Condition]
Moving Average
     [ A ]   The bar opens above the Moving Average
     Smoothing method  -  Simple
     Base price  -  Low
     Period  -  50
     Shift  -  0
     Use previous bar value  -  Yes

As you can see I tuned the indis to fit your strat, the best I can achieve without custom indis unfortunately.

Re: Moving Averages In and out

OK, thanks!. I put it through the optimization in FSB and this is what came out for EURUSD 1Day:

http://www.screencast.com/users/thumbcu … d88524f971

I used SL at 750 and at 150 and had decent results. It's doing what I hoped to do, which is lose little at a time, but run the big ones. Anyone see any issues? What have your testing results shown?

Re: Moving Averages In and out

Too much of a drawdown in the middle, what OOS is showing while optimizing? That gives a clearer picture of how this strat performs.

Re: Moving Averages In and out

if you mean what level? ie. the horizontal line? or the "date" the vertical line? The horizontal line changes of course, but the veritcal line stays pretty steady at 4/26/04 for most of the exercise. If I shorten the data history, it still stays around 3/5ths of the left to right scale.

Re: Moving Averages In and out

No, horizontal line is the date line, it shows the starting point of out of sample data. The important part is the equity/balance curve AFTER the OOS date line. A little example: http://forexsb.com/wiki/_media/fsb/manual/generator_limitations.png

You see, equity/balance curve continues going upwards on out of sample data, it's probably a good strat. If curve goes down in OOS, then probably the strat fails in live trading.

Re: Moving Averages In and out

thanks. I guess I should have paid more attention to that .... yikes
I will check again and let you know.