This strategy open orders following the trend of the market, use the
EUR / USD pair in 30 minutes chart with a Take Profit of 40 pips and a
Stop Loss of 30 pips.
To determine the trend I use 3 indicators
- SMA 15 periods applied to Open price (= SmaOpen)
- SMA 15 periods applied to Close price (= SmaClose)
- MACD with Fast period = 20, Slow period 40 and Macd signal 9. The
Macd Histogram (= MacdHist) is used as a filter.
I used this strategy and it's a good strategy to trend markets not so
good for ranging markets it's simple, visual and don't need sma cross
to enter in the market, because of that the Stop loss - Take profit
ratio is attractive, the TP secure profits and can enter in the trend
again.
The logic of the strategy is as follows, first I test the timeframe
bar and load the indicators then I test the open orders number if
it's less than 1 ( no open orders) I validate the values of SMAClose
and SMAOpen if the SMAClose it's greater or equal than SMAOpen and the
MacdHist > 0 then i open a BUY market order and store the Position and
that's long the oposite for SELL orders. if the SMAClose it's lowest
than SMAOpen and the MacdHist < 0 then i open a SELL order and store
the Position and that's short.
When the open order number it's equal to 1 (exist an open order) i
check if it's a long or a short position if it's long the strategy
checks if the conditions are still satisfied for a long order i.e
SmaClose >= SmaOpen and MacdHist > 0, if so the cicle continues if
not closes the order and cleans the stored Long variable. If the open
order is short validate if SmaClose < SmaOpen and MacdHist > 0, if so
the cycle continues if not closes the open order and cleans the stored
Short variable.