if var_RSI > 70 then SellShort next bar at market;
if var_RSI<25 then buy next bar at market;
//exit
Inputs: Maxloss(60),profit(30);
if marketposition = 1 then begin
sell all shares next bar at entryprice - Maxloss stop;
sell all shares next bar at entryprice + profit limit;
end;
if marketposition = -1 then begin
buytocover all shares next bar at entryprice + Maxloss stop;
buytocover all shares next bar at entryprice - profit limit;