in my archive, I found this Trading System, and the author recommended to do tests with 3 Exit, to improve the efficiency and robustness of the T.S.

If someone could kindly transform the 3 Exit into Easylanguage and insert them into the formula, which I will try one at a time with the use of parentheses: { }.

These are the 3 Exit to be included in the formula:

{after Buy}: Exit with a profit after 30 bars, if the closing is less than the exponential moving average of 5 days.

{after Sellshort}: Exit with a profit after 30 bars, if the closing is higher than the exponential moving average of 5 days.

{after Buy}: Exit with a limit order if the open profit exceeds 20%.

{after Sellshort}: Exit with a limit order if the open profit exceeds 20%.

{after Buy}: Exit with a profit if the trade lasts for more than 50 bars.

{after Sellshort}: Exit with a profit if the trade lasts for more than 50 bars.

This is the formula of the T.S. for Tradestation 8 or higher:

-----------------------------------------------------------------

Inputs: length(30), MaxEntryLB(60), MinEntryLB(20), MaxExitLB(30), MinExitLB(10);

Vars: HistVol(O), YestHistVol(O), DeltaHistVol(O), EntryLB(O), ExitLB(O),

YestEntryLB(O), YestExitLB(O);

YestHistVol = HistVol;

HistVol = StdDev(C, length);

DeltaHistVol = (HistVol-YestHistVol) / HistVol;

If CurrentBar = 1 Then EntryLB = 20;

YestEntryLB = EntryLB;

EntryLB = YestEntryLB * (1 + DeltaHistVol);

EntryLB = MaxList(EntryLB, MinEntryLB);

EntryLB = MinList(EntryLB, MaxEntryLB);

YestExitLB = ExitLB;

ExitLB = YestExitLB * (1 - DeltaHistVol);

ExitLB = MinList(ExitLB, MaxExitLB);

ExitLB = MaxList(ExitLB, MinExitLB);

Buy next bar at Highest(High, EntryLB) Stop;

Sellshort next bar at Lowest(Low, EntryLB) Stop;

Sell next bar at Lowest(Low, ExitLB) Stop;

Buytocover next bar at Highest(High, ExitLB) Stop;

Setstoploss(1500);

------------------------------------------------------------------------------

I thank you in advance for your collaboration.