# Simple Momentum Strategy



## kushi212 (20 July 2015)

Hi everyone,

I've designed a simple momentum strategy by eyeballing through different charts on Amibroker.
It works well in trending stocks.
I use 3 ema's - 3,6,18.
For buy - ema3>ema6>ema18   and vice versa for sell
for buy signal there should be a green candle over 3ema and close of green candle should almost be equal to high. (atleast 80%)

By eyeballing through different charts, it seems to be working well. In this strategy, we would buy in the afternoon (last 15 mins or so), if close is almost equal to high. By doing this we can ensure we don't miss out on gap-up opening the next day.

The main difficulty I am facing is in determining the exit and stop loss for the trade. For now, I have placed the initial SL below the low of the trigger candle.

This also works well if we simply do "Buy today sell tomorrow". I have noticed that most of the days, the gap opening is in the favor of the trend. 

I haven't backtested this strategy. I was just playing each bar in Amibroker and did paper trading and it works well. 

As this strategy is very simple, I am a bit skeptical about it. (If it was so easy, everyone would do this)

Any comments on this experts???


----------



## sinner (20 July 2015)

kushi212 said:


> Hi everyone,
> 
> I've designed a simple momentum strategy by eyeballing through different charts on Amibroker.
> It works well in trending stocks.
> ...




Depends on what you're trying to catch, and also whether or not you want your initial stop to be the same thing as your trailing stop.

For example, if you want to catch short term moves (lets say <10 day avg hold), an initial volatility based position size and stop of 2.5-3.5ATR and trailing stops above the entry price using the 1-3 day high/ow. Or you could just place your initial stop at the 3 day high/low and trail from there.

Slightly longer term moves you can "trail" using exits of the 6/18 cross or the value of the 18EMA, or using the value of the most recent swing high/low (defined as a 3 bar pattern).

Longer than that, 40-70EMA as the trail, or expand the number of bars in your swing high/low pattern. 

Another option aside from all of this is to use a time based exit. You would be surprised at how effective this can be with some setups. For example, "exit after 5 (or 20, or 40) days". This means no price based stops so a  different position sizing algorithm, but I have seen impressive results that make it a worthwhile consideration.

All of these strategies have different drawbacks and rewards. To my knowledge there isn't any way to have all of the rewards and none of the drawbacks, so it's a matter of figuring out where the returns on your winners start to drop off (for example, after 5 days, or after breaching the 2 day high/low) and select a strategy which optimises for that.


----------



## Wysiwyg (21 July 2015)

Not an expert but MA crossovers buy/sell produce average to poor results. The reasons ...

1) the entry and exit is a lottery (i.e. the distance price moves between cross overs is random)
2) price does come off highs quickly and the delay for cross over to exit gives back a lot of profit 
3) losses accumulate when price is range bound and range bound stock is not evident until you get chopped up a few times

Be sceptical.


----------



## Trembling Hand (21 July 2015)

kushi212 said:


> By eyeballing through different charts, it seems to be working well. In this strategy, we would buy in the afternoon (last 15 mins or so), if close is almost equal to high. By doing this we can ensure we don't miss out on gap-up opening the next day.




You cannot have this type of trigger in your system. You cannot buy before a close based on the close. you certainly cannot code an EOD system like that. And your "eyeballing" through charts is at best only the very start of investigating an idea to trade. I think if you used live data and did 40-50 trades you may find it a rather tough way to trade.


----------



## peter2 (21 July 2015)

I notice that another round of the ASX sharemarket game starts Aug 6th. 

If kushi212, you're really serious about this, then use your strategy in the game. You'll gain invaluable experience with it in real-time.


----------



## kushi212 (22 July 2015)

peter2 said:


> I notice that another round of the ASX sharemarket game starts Aug 6th.
> 
> If kushi212, you're really serious about this, then use your strategy in the game. You'll gain invaluable experience with it in real-time.




Thanks Perter2. 

That's good to know. I will take part in it.


----------



## kushi212 (22 July 2015)

Wysiwyg said:


> Not an expert but MA crossovers buy/sell produce average to poor results. The reasons ...
> 
> 1) the entry and exit is a lottery (i.e. the distance price moves between cross overs is random)
> 2) price does come off highs quickly and the delay for cross over to exit gives back a lot of profit
> ...




Hi Wysiwyg,

I do agree with you. In the strategy, I am not planning to exit at crossover. I would rather have a time based exit strategy or some thing like - sell when price trades below previous day low (keeping some room to eliminate noise.)

However, as you said, it is important to scan stocks first. This won't work well in a choppy market. Need to scan for trending stocks. I agree that we won't know in advance whether price is going to be choppy or not, but as this is a probability game, goal would be to make the odds in you favor.


----------



## kushi212 (22 July 2015)

sinner said:


> Depends on what you're trying to catch, and also whether or not you want your initial stop to be the same thing as your trailing stop.
> 
> For example, if you want to catch short term moves (lets say <10 day avg hold), an initial volatility based position size and stop of 2.5-3.5ATR and trailing stops above the entry price using the 1-3 day high/ow. Or you could just place your initial stop at the 3 day high/low and trail from there.
> 
> ...




Thanks for the valuable advice !!!


----------



## Wysiwyg (23 July 2015)

kushi212 said:


> goal would be to make the odds in you favor.




Okay here is your MA strategy to test. Change it to whatever you want and let me know the outcomes please. 



```
PosQty = Param("Number of Positions", 10, 1, 20, 1); 
SetOption("MaxOpenPositions", PosQty );
PositionSize = -100/PosQty; 
PositionScore = RSI() > 50;

Liquidity = MA(C*V, 10) > 250000;
PR = H - L; 
HighClose = C >= (PR * 0.80 + L);

MACondition1 = EMA(C, 3) > EMA(C, 6) & EMA(C, 3) > EMA(C, 18) & EMA(C, 6) > EMA(C, 18);
MACondition2 = Cross(EMA(C, 6), EMA(C, 18)) & MACondition1;
BuyWhen1 = MACondition1 & C > EMA(C, 3) & HighClose;
BuyWhen2 = MACondition2 & HighClose;

Buy = BuyWhen1 & Liquidity;
Sell = 0;

// Stop loss
ApplyStop(0, 2, 2 * ATR(10), 2);

// Stop profit percent
ApplyStop(1, 1, Optimize("Stop Percent Trick", 5, 1, 20, 1), 2);

// Stop bar number
//ApplyStop(3, 1, Optimize("Stop Bar Trick", 5, 1, 20, 1), 2);
```


----------



## kushi212 (25 July 2015)

Hi,

Thanks for the code.
As I am stll very new to AFL, I can't understand the following code:
---------------------------------------------------------------------------
// Stop loss
ApplyStop(0, 2, 2 * ATR(10), 2);

// Stop profit percent
ApplyStop(1, 1, Optimize("Stop Percent Trick", 5, 1, 20, 1), 2);

// Stop bar number
//ApplyStop(3, 1, Optimize("Stop Bar Trick", 5, 1, 20, 1), 2);
---------------------------------------------------------------------------


----------



## Wysiwyg (25 July 2015)

Study the AFL functions in the Users Guide. It is like a dictionary is to words.


----------



## Colonel Flagg (26 July 2015)

Trembling Hand said:


> You cannot have this type of trigger in your system. You cannot buy before a close based on the close. you certainly cannot code an EOD system like that. And your "eyeballing" through charts is at best only the very start of investigating an idea to trade. I think if you used live data and did 40-50 trades you may find it a rather tough way to trade.





I use Premium Data and they have optional "Market Snapshots" at 20min past the hour on the ASX.

So at 3.25pm you can download the snapshot and get an approximate close to base your trigger / trade on.

I trade weekly, so the difference between 3.30pm and the close is not too much of a drama.


----------



## Wysiwyg (26 July 2015)

You should have noticed that buying stocks from February this year has returned a negative result using this strategy because the momentum stalled and fell away from that point. I remember at that time in February my stock holdings were up and I was confident of trend continuity but disappointingly bearishness became and still is the majority choice.
You will see this strategy work better with bullish market sentiment and yes that is when  strategies (even dart choices) do better. 

A word of wisdom. Seriously value invest (learn - Value Investing) in stocks and play the ups n downs of the Indices and Commodities.


----------

