Short Description

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

Description of parameters:



selectedInstrument instrument

takeProfit int

defaultStopLoss int

selectedPeriod period

Signals signals


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).
"support line" - BBAND indicator lower line
"resistance line" - BBAND indicator upper line

Open file:

Download file: