Target / StopLoss forex  [SOLVED]

Questions about MultiCharts and user contributed studies.
cjwik
Posts: 4
Joined: 13 Dec 2013
Been thanked: 1 time

Target / StopLoss forex  [SOLVED]

Postby cjwik » 15 Nov 2015

Hi,

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;

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Target / StopLoss forex

Postby TJ » 15 Nov 2015

See post #5
[FAQ] Built-In Stops / Profit Targets / OCO Orders
viewtopic.php?f=16&t=10811


Return to “MultiCharts”