Saturday, October 3, 2009

Money Management Method

Method
  1. Open Buy and Sell positions anytime
  2. Set profit take target and cut loss level
  3. if Profit to Loss ratio is set higher, then evertime you win, you win more. everytime you loss you loss less.
Parameters
  1. Profit take target
  2. Cut Loss Level
Results

Result for Take Profit at $60, Cut Loss at $30. Profit to Lost ratio set at 2:1


A more Balance approach, Both Profit and Loss ratio set at 1:1 ( result )


It may look the same but actually an important difference. Profit:Lost ratio @ 2:1 lose out faster than 1:1

Reason

Profit Lost ratio works together with WIN:LOSE ratio. Setting Profit Lost ratio at 2:1 does not mean WIN:LOSE stays at 50%. As a matter of fact when you set Profit Target to twice the amount of Lost level, it becomes so much harder to achieve. As a result your WIN:LOSE ratio become much lower than 1:2, in other words you will lose out your capital FASTER!

Codes

for(i=oti ; i>=0 ; i--){
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;
if(OrderMagicNumber()!=MAGICMA || OrderSymbol()!=Symbol()) continue;
p = OrderProfit();
if((p < -cutLossMargin) || (p > minMargin)){
mtClose();
Print("===============>", p);
}
if(OrderType()==OP_BUY) buyOrders++ ;
if(OrderType()==OP_SELL) sellOrders++;
}
if(buyOrders==0) mtOpenBuy();
if(sellOrders==0) mtOpenSell();

regression weighted count on trend


Method
1. look back previous X number of price movements
2. if the latest price shows an upward move, add +1 and weighted it ( X - 1 )
3. like wise if the 2nd price goes downward, add -1 and weighted it ( X - 2 )
4. At the end, if you have a positive sum, generally it is an up trend
5. If the sum is negative, it is a down trend

Parameters
1. Number of previous data to analyse
2. Percentage of occurance to determine it is considered a trend


Reason
You are taking previous data to decide the trend. By the time you have enough data to prove the trend, the trend may already be ended. The only time this will work is a very pro-long trend like this.

Most of the other time, it may become like this :


Hence there will never be a single set of parameters that can cater for all situations.

Codes
extern int TRACEBACK = 100 ; // trace back to 100 points
extern double TRENDCUTOFF = 0.6 ; // if occur more than 60% of the time

for(i=0 ; i <>
o=Open[i];
oprev=Open[i+1];

// weigthed up or down count, open to open, close to close
if(o > oprev) {
regoCount = regoCount + (TRACEBACK-i);
}else if(o <>
regoCount = regoCount - (TRACEBACK-i);
}
int tb = TRACEBACK ;
double tbsum = (tb / 2 - 1) * tb + tb + tb/2 ;
regoCount = regoCount / tbsum ; // make it into a percentage

if(upCount > (TRACEBACK * TRENDCUTOFF)) upCountTrend = true;
if(downCount > (TRACEBACK * TRENDCUTOFF)) downCountTrend = true;
if((upTrend==false) && (downTrend==false)) sideCountTrend = true;