Simple EaslyLanguage Question -- stop loss

Questions about MultiCharts and user contributed studies.
Kingjelly
Posts: 25
Joined: 23 Jan 2008

Simple EaslyLanguage Question -- stop loss

Postby Kingjelly » 17 Mar 2011

Hi,

This should be simple, but I am having a hard time with it. I want a stoploss strategy that after I am in profit by a certain amount that I want to set my stop loss 1 tick below the low of the last completed bar. Can anyone help me please?

Thanks

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 485 times

Re: Simple EaslyLanguage Question

Postby Dave Masalov » 18 Mar 2011

Dear Kingjelly,

Please try to use the following code:

Code: Select all

if marketposition <= 0 then condition1 = false;

if marketposition > 0 and close > entryprice + 10 points then begin
   condition1 = true;
   value1 = low[1] - 1 point;
end;

if ( condition1 )
   sell next bar at value1 stop;

Kingjelly
Posts: 25
Joined: 23 Jan 2008

Re: Simple EaslyLanguage Question

Postby Kingjelly » 21 Mar 2011

Thanks!


Return to “MultiCharts”