Sell Price and If conditional

Hi, do you know why this doesn't work? Is it not possible to use if condition to define SellPrice?

Do not post just pictures.
In addition post code within code tags next time, please.

That being said, your code is incorrect (syntax).

SellPrice = IIf(exitSignal, Open, StopLoss);// SellPrice is type array

Also see

BUT since you try to create stoploss you should actually use ApplyStop function.

Sell = Ref(exitSignal, -1);
SellPrice = Open;

stop_amount = 10;
ApplyStop(stopTypeLoss, stopModePoint, stop_amount, exitatstop = 1);

Thank you fxshrat ! Sorry for the picture. I would like to use Applystop function but I need to use a variable stoploss and also a backtest regular raw mode ...but variable SL is not suppored in BacktestRegularRaw mode. Do you know how to deal with that situation? Should I use low level CBT?