Blocks

Short Description

Block Definition:
Bollinger Band Example - This strategy creates trades based on BBAND "ressistance" and "support" lines.

Description of parameters:

Tooltips

input

selectedInstrument instrument

takeProfit int

defaultStopLoss int

selectedPeriod period

Signals signals

Out

Main Description

Main Definition:

This strategy checks trading algorithm in the SelectedPeriod time interval.
Firstly, the strategy remembers if the market price has crossed the BBAND indicator upper or lower line.
Secondly, if the candle close price is greater than the support line and the candle's lower price has crossed the support line, the strategy creates a LONG position. If the candle's close price is less than the resistance line and the candle's upper price has crossed the resistance line, the strategy creates a SHORT position. The strategy creates a position if a same side position not exist (i.e. The strategy does not create a LONG position if the LONG position alredy exists).
Note:
"support line" - BBAND indicator lower line
"resistance line" - BBAND indicator upper line

Open file:

Download file: