Thank you for your prompt response. I really appreciate it. If its not too much of a trouble, wondering if you can advise me with the code.
Example of strategy:
On 1-hour time frame:
Buy when the price is below (on closing) the lower band of Bollinger Band (2 SD, 50 interval), entry at the next bar open;
Sell when the price is above the higher band of the Bollinger Band (1 SD, 50 interval), at the instance the price pierce through the BBand level;
The code generated from the simplified creation is shown below. How can I modify the code to meet the conditions above?
Thank you very much.
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Conditions to enter long positions
indicator1 = BollingerDown[50](close)
c1 = (indicator1 <= close)
IF c1 THEN
BUY 1 SHARES AT MARKET
ENDIF
// Conditions to exit long positions
indicator2 = BollingerUp[50](close)
c2 = (close >= indicator2)
IF c2 THEN
SELL AT MARKET
ENDIF