PureBytes Links
Trading Reference Links
|
Hello all,
I've been racking my brain trying to figure out how to plot the
standard Parabolic Trailing SX Signal in Tradestation as an indicator.
Though I may be stating the obvious, this signal does not plot exactly
the same as the standard Parabolic indicator. I've listed the code
below. Any help is greatly appreciated.
Thanks in advance.
Regards,
Ernest.
{*******************************************************************
Description : Modified Parabolic Short Exit
Provided By : Omega Research, Inc. (c) Copyright 1999
********************************************************************}
Inputs: Acceleration(.02), FirstBarMult(3);
Variables: SAR(0), AF(0), StopPrice(0), MP(0), LowValue(0);
MP = MarketPosition;
If Low < LowValue Then
LowValue = Low;
If MP = -1 Then Begin
If MP[1] <> -1 Then Begin
StopPrice = High + Average(TrueRange, 3) * FirstBarMult;
AF = Acceleration;
LowValue = Low;
End
Else Begin
StopPrice = StopPrice - AF * (StopPrice - LowValue);
If LowValue < LowValue[1] AND AF < 0.2 Then
AF = AF + MinList(Acceleration, 0.2 - AF);
End;
If StopPrice < High Then
StopPrice = High;
End;
IF MP = -1 Then
ExitShort ("PT") Next Bar at StopPrice Stop;
|