The BB middle line is a Moving Average, so for the: BB - 20, 2, Exp it is: MA(20) Exp. Close
For: BB crosses above MA 50
We can use: MA Oscillator - it is equal of the difference of two MAs
When MA1 = MA2 than the MA Oscillator = 0
BB crosses above MA 50 means: MA Osc. crosses the zero line upward
The strategy will be something like:
[Opening point of the position]
Bar Opening
Enter the market at the beginning of the bar
Base price - Open
[Opening logic condition]
MA Oscillator
The MA Oscillator crosses the Level line upward
Smoothing method - Exponential
Base price - Close
Fast MA period - 20
Slow MA period - 50
Level - 0
Use previous bar value - Yes
[Opening logic condition]
RSI
The RSI is higher than the Level line
Smoothing method - Simple
Base price - Close
Smoothing period - 14
Level - 50
Use previous bar value - Yes
[Closing point of the position]
Bar Closing
Exit the market at the end of the bar
Base price - Close
[Closing logic condition]
MA Oscillator
The MA Oscillator crosses the Level line upward
Smoothing method - Exponential
Base price - Close
Fast MA period - 10
Slow MA period - 20
Level - 0
Use previous bar value - No
[Closing logic condition]
RSI
The RSI is lower than the Level line
Smoothing method - Simple
Base price - Close
Smoothing period - 14
Level - 50
Use previous bar value - No
To be clearer I will explain further:
We will open at the beginning of the bar - [Opening point of the position],
but only when the [Opening logic conditions] are fulfilled
MA oscillator (20, 50) crosses the zero line upwards (Level line = 0)
and RSI > 50
We will close at the end of the bar only if either
MA oscillator (10, 20) crosses the zero line upwards or
RSI drops below 50.
Here we are using the BB middle line only, so we do not need BB, and the MA oscillator is enough for the
comparison.