Topic: How to make a losing strategy take the opposite trades (CONTRARIAN)

The simple stochastic rule below loses money big time.

All I want is to make it take the opposite trades, consequently it should do the opposite (win)..

How??

<?xml version="1.0" ?>
- <strategy>
  <programName>Forex Strategy Builder</programName>
  <programVersion>2.5.3.1</programVersion>
  <strategyName>straight down</strategyName>
  <instrumentSymbol>USDJPY</instrumentSymbol>
  <instrumentPeriod>hour1</instrumentPeriod>
  <spread>2</spread>
  <swapNumber>1</swapNumber>
  <sameDirSignalAction>Nothing</sameDirSignalAction>
  <oppDirSignalAction>Reverse</oppDirSignalAction>
  <openFilters>1</openFilters>
  <closeFilters>0</closeFilters>
- <slot slotNumber="0" slotType="Open">
  <indicatorName>Bar Opening</indicatorName>
- <listParam paramNumber="0">
  <caption>Logic</caption>
  <index>0</index>
  <value>Enter the market at the beginning of the bar</value>
  </listParam>
- <listParam paramNumber="1">
  <caption>Base price</caption>
  <index>0</index>
  <value>Open</value>
  </listParam>
  </slot>
- <slot slotNumber="1" slotType="OpenFilter">
  <indicatorName>Stochastics</indicatorName>
- <listParam paramNumber="0">
  <caption>Logic</caption>
  <index>2</index>
  <value>The Slow %D is higher than the Level line</value>
  </listParam>
- <listParam paramNumber="1">
  <caption>Smoothing method</caption>
  <index>2</index>
  <value>Exponential</value>
  </listParam>
- <numParam paramNumber="0">
  <caption>%K period</caption>
  <value>20</value>
  </numParam>
- <numParam paramNumber="1">
  <caption>Fast %D period</caption>
  <value>6</value>
  </numParam>
- <numParam paramNumber="2">
  <caption>Slow %D period</caption>
  <value>5</value>
  </numParam>
- <numParam paramNumber="3">
  <caption>Level</caption>
  <value>20</value>
  </numParam>
- <checkParam paramNumber="0">
  <caption>Use previous bar value</caption>
  <value>True</value>
  </checkParam>
  </slot>
- <slot slotNumber="2" slotType="Close">
  <indicatorName>Bar Closing</indicatorName>
- <listParam paramNumber="0">
  <caption>Logic</caption>
  <index>0</index>
  <value>Exit the market at the end of the bar</value>
  </listParam>
- <listParam paramNumber="1">
  <caption>Base price</caption>
  <index>0</index>
  <value>Close</value>
  </listParam>
  </slot>
  </strategy>

Re: How to make a losing strategy take the opposite trades (CONTRARIAN)

I would think that you would only need to reverse the "Nothing, Reverse" Action on Direction.

Unfortunately, it isn't currently possible to do the required "Reverse, Nothing" Action on Direction.

Cogito Ergo Sum

3

Re: How to make a losing strategy take the opposite trades (CONTRARIAN)

This is your strategy:

A same direction signal - Does nothing
An opposite direction signal - Reverses the position

[Opening point of the position]
Bar Opening
     Enter the market at the beginning of the bar
     Base price  -  Open

[Opening logic condition]
Stochastics
     The Slow %D is higher than the Level line
     Smoothing method  -  Exponential
     %K period  -  20
     Fast %D period  -  6
     Slow %D period  -  5
     Level  -  20
     Use previous bar value  -  Yes

[Closing point of the position]
Bar Closing
     Exit the market at the end of the bar
     Base price  -  Close


The direction filter is: The Slow %D is higher than the Level line
Making it opposite The Slow %D is lower than the Level line does not make it profitable:

Forex Strategy Builder v2.5.3.1
Strategy name: straight down
Exported on: 10/14/2007 7:57:55 AM

Market: USDJPY 1 Hour
Spread: 2 pips
Swap Number: 1 pip

Intrabar scanning: Not accomplished
Interpolation method: Pessimistic scenario
Ambiguous bars: 0
Tested bars: 16981
Balance: -10323 pips
Minimum account: -10328 pips
Maximum drawdown: 10336 pips
Time in position: 29 %

A same direction signal - Does nothing
An opposite direction signal - Reverses the position

[Opening point of the position]
Bar Opening
     Enter the market at the beginning of the bar
     Base price  -  Open

[Opening logic condition]
Stochastics
     The Slow %D is lower than the Level line
     Smoothing method  -  Exponential
     %K period  -  20
     Fast %D period  -  6
     Slow %D period  -  5
     Level  -  20
     Use previous bar value  -  Yes

[Closing point of the position]
Bar Closing
     Exit the market at the end of the bar
     Base price  -  Close


This logic loses money even when the spread and the swap are 0.