Hi all,
just want to check how do I get the Middle Line for BB?
BBPERIOD = 20
STDDEV = 2
AVG = Average[BBPERIOD](close)
BBUPPER = AVG + (Std[BBPERIOD] * STDDEV) // Upper Bollinger Value
BBLOWER = AVG - (Std[BBPERIOD] * STDDEV) // Lower Bollinger Value
I tried to calculate but the value I getting is so much different from the one on the Chart.
Understanding that IG uses 10.2 PRT (WTH!!! already called them to upgrade), but is there a way now for me to Test my coding results to see what is the value calculated so that I can match what I see on the Chart?
Thanks all!
Hi, bollinger bands center line is a “simple moving average” of 20 periods, as you already calculated it with your AVG variable.
Hi Nicolas,
Great, thanks for your reply. Do you think using BB, RSI and MACD can identify Breakouts and take some profits from there?
Also, I keep thinking on a scenario on how to code it.
For example, if this strategy identifies a breakout, and enter a position to either buy/sell along with the breakout:
Q: how do I determine the Take Profits portion? Well Stop Loss can be my previous bar highest or lowest for the time being and later can add in some risk management portion.
Q: how do I “tell” my Bot not to repeat the same trend again as I already took profits. Maybe the trend is still there, but I already exit with some profits….
Thanks!
About the take profit, you should focus on keeping the best risk/reward ration the market can offer. In my own experience, I encourage you to cut quickly your loss and let your profit running.
For your second question, it depends mainly on how the conditions for your strategy to initiate a trade are met.