Let's say my strategy is to buy when RSI > 70, with some kind of profit condition and stop loss. Dummy code would look something like
Code: Select all
if RSI > 70 then
Buy next bar market;
setstopposition;
setstoploss(100)
is this possible? I tried using various loop logics, but the compiler doesn't let me place an order command inside a for loop. I thought that `once` might work --
Code: Select all
if RSI > 70 then
once
buy next bar market