[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: MaxAdverseExcursion



PureBytes Links

Trading Reference Links

MaxPositionLoss might be what you are looking for. Here's what I use. It is a user function called MAEpnt. This will catch up to 3 trades that are closed out on a single bar.

Scott Hoffman

{
Print Max Adverse Excursion for each trade
}

for Value1 = 2 downto 0 begin
  if ExitDate(Value1) = D[1] then begin
    print(file("c:\tsoutput\tsmae.csv"),ExitDate(Value1):0:0,",",PositionProfit(Value1):0:2,",",MaxPositionLoss(Value1):0:2);
  end;
end;

MAEpnt = 1;

-----Original Message-----
From:	robert [SMTP:robertr@xxxxxxxxxxxxx]
Sent:	Sunday, July 05, 1998 5:06 AM
To:	Omega-List
Subject:	MaxAdverseExcursion

Can someone help with a bit of EL code?

I've calculated my maximum adverse excursion for a series of hypothetical
trades and rather than just set this value as my moneymanagement stop, I'd
like to stop and reverse the trade at this point. I've tried several
approaches but I'm unable to code it to work:(Entryprice - $600 is where I
wish to SAR the trade).

 If MarketPosition= 1 then Sell("LongReversal") at EntryPrice -
Ceiling(600/pointvalue)points stop;

  If MarketPosition= 1 then Sell("LongReversal") at EntryPrice -
MoneyMgmtStopAmt stop;
(TS4 tells me it doesn't recognise this system function "MoneyMgmtStopAmt"-
how does one call and use such a function?)

Thankyou for any help you are able to offer.