logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
MS Support  
#1 Posted : Tuesday, November 5, 2019 6:28:51 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,588

Thanks: 50 times
Was thanked: 125 time(s) in 121 post(s)

Pawel Kosinski’s article, “Combining Bollinger Bands with Candlesticks”, explains how to construct a trading system based on the analysis tools named in the title. The strategy uses 20-period Bollingers Bands set at 2.2 standard deviations from the center average and 4 times a 14-period Average True Range for a maximum loss stop. The entry and exit formulas for that system are shown below:

Buy Order tab:

Formula:

Code:
stop:= Ref(C, -1) - (4 * ATR(14));
RR:= (BBandTop(C, 20, S, 2.2)-H)/ (H-RR);
el:= C > Ref(H, -1) AND Ref( EngulfingBull(), -1) AND
Ref( Alert( L < BBandBot(C, 20, S, 2.2), 2), -1) AND RR > 1.0;
xl:= H > BBandTop(C, 20, S, 2.2);
trade:= If( PREV<=0, If(el, stop, 0),
If( L<= PREV, -1, If( xl, -2, PREV)));
trade > 0 AND Ref(trade <= 0, -1)

Sell Order tab:

Formula:

Code:
stop:= Ref(C, -1) - (4 * ATR(14));
RR:= (BBandTop(C, 20, S, 2.2)-H)/ (H-RR);
el:= C > Ref(H, -1) AND Ref( EngulfingBull(), -1) AND
Ref( Alert( L < BBandBot(C, 20, S, 2.2), 2), -1) AND RR > 1.0;
xl:= H > BBandTop(C, 20, S, 2.2);
trade:= If( PREV<=0, If(el, stop, 0),
If( L<= PREV, -1, If( xl, -2, PREV)));
trade < 0

Order Type: Stop Limit

Stop or Limit Price:

Code:
stop:= Ref(C, -1) - (4 * ATR(14));
RR:= (BBandTop(C, 20, S, 2.2)-H)/ (H-RR);
el:= C > Ref(H, -1) AND Ref( EngulfingBull(), -1) AND
Ref( Alert( L < BBandBot(C, 20, S, 2.2), 2), -1) AND RR > 1.0;
xl:= H > BBandTop(C, 20, S, 2.2);
trade:= If( PREV<=0, If(el, stop, 0),
If( L<= PREV, -1, If( xl, -2, PREV)));
If( trade = -1, Ref(trade, -1), C)

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.