scaled out  [SOLVED]

Questions about MultiCharts and user contributed studies.
palmone
Posts: 34
Joined: 24 Apr 2014
Has thanked: 4 times
Been thanked: 2 times

scaled out

Postby palmone » 15 Oct 2014

Hi have problem withs scale out. In case of currentcontracts=2 the exit is always at the same price for both contracts "trl" instead of exit just for 1


if marketposition=1 then begin

if currentcontracts=1 and c<Average(mov,20) then sell ("lave1") next bar at Open;

if currentcontracts=2 then
sell ("Trl") 1 contract Next Bar at OrderPrice Stop;


end;

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 558 times

Re: scaled out  [SOLVED]

Postby Andrew MultiCharts » 15 Oct 2014

Hello palmone,

If you want to exit only part of the position, you should use the keyword "total" in your code.

palmone
Posts: 34
Joined: 24 Apr 2014
Has thanked: 4 times
Been thanked: 2 times

Re: scaled out

Postby palmone » 15 Oct 2014

Thank you very much andrew , the code as follow now works!

if currentcontracts=2 then
sell ("Trl") 1 contract TOTAL Next Bar at OrderPrice Stop;


Return to “MultiCharts”