In my previous article i have shown you a strategy based on MACD & stochastic oscillator. This strategy is one of the best strategy present in the library. Lets automate it and see
is this is a profitable strategy or not?So lets start building the strategy first.
STEP-1 Beginning
1. Periods + Instrument Selections
2. Position Limiting Block
Take a look at the Figure-
STEP-2 Indicators
1. Macd
As from figure to Open a trade we have to look at the slope of macd.
is it upward or downward? To know we have to think about simple maths. we need three last histograms to be
Uptrend- "up down up"
Downtrend- "down up down"See the Figures
hence it is confirmed that we have require the past three histogram data which is given by
MACD(Shift1), MACD(Shift2), MACD(Shift3)
2. Stochastic
A simple Stochastic of default period with shift-1
This is how it looks like-
STEP-3 Opening Orders1. In the figure, The left hand portion is for opening Sell order and Right hand portion is for open Buy orders.
2. We have used 3 macd hence to Open a position we have to use same down up down strategy for opening Short position and vice versa for a long position.
3. Stochastic is default as crossover, if it …