Trying to understand how to be able parameters for Target and StopLoss, and use number of pips for each of them. I have tried this and does seems to work.
Code: Select all
Input:
stopLossPips (10),
targetPips (10);
vars:
varRsi (0);
varRsi = rsi(close ,2);
if marketposition = 0 then begin
if varRsi < 10 then begin
Buy("B1") next bar at market;
SetStopContract;
setstoploss (stopLossPips/10000);
setprofittarget (targetPips/10000);
end;
end;