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

Mrkt Profit Target Indicator Creation



PureBytes Links

Trading Reference Links

I wanted to adapt and use an ATR based Profit Target Exit in an Oddball
variation. The TS2K code below is the only one I've found, so I tried it. It
does show promise, though, frankly, I am not entirely clear how it functions
after watching it for a week or so.

One difficulty though is that I can not tell in advance when the target is
nearing, and thus be prepared for the exit signal. Makes for an imprisoned
market experience.

I'm wondering if anyone has or is willing to turn them into an indicator, in
the interest of unchaining me from my desk. - )

Many thanks!

Both are copied below.

Eliot

{*******************************************************************
Description : Market Defined Profit Target Stop Long Exit
Provided By : Omega Research, Inc. (c) Copyright 1999
********************************************************************}
 
Inputs: PositionLength(5), ATRProfit(2);
Variables: ATR(0), PositionHigh(0), Target(0), LimProfitStop(False),
StopPrice(0);
 
If MarketPosition = 1 Then Begin
 ATR = AvgTrueRange(5);
 If BarsSinceEntry = 0 Then Begin
  PositionHigh = High;
  Target = EntryPrice + (ATRProfit * ATR);
 End;
 If High > PositionHigh then
  PositionHigh = High;
 If BarsSinceEntry >= PositionLength AND PositionHigh < Target Then Begin
  LimProfitStop = True;
  StopPrice = Low;
 End;
 If LimProfitStop Then
  ExitLong ("LP") Next Bar at StopPrice Stop;
End
Else
 LimProfitStop = False;

{*******************************************************************
Description : Market Defined Profit Target Stop Short Exit
Provided By : Omega Research, Inc. (c) Copyright 1999
********************************************************************}
 
Inputs: PositionLength(5), ATRProfit(2);
Variables: ATR(0), PositionLow(0), Target(0), LimProfitStop(False),
StopPrice(0);
 
If MarketPosition = -1 Then Begin
 ATR = AvgTrueRange(5);
 If BarsSinceEntry = 0 Then Begin
  PositionLow = Low;
  Target = EntryPrice - (ATRProfit * ATR);
 End;
 IF Low < PositionLow then
  PositionLow = Low;
 If BarsSinceEntry >= PositionLength AND PositionLow > Target Then Begin
  LimProfitStop = True;
  StopPrice = High;
 End;
  
 If LimProfitStop Then
  ExitShort ("SP") Next Bar at StopPrice Stop;
End
Else
 LimProfitStop = False;

^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Eliot Kaplan
email; eliot@xxxxxxx
web: http://www.isu.com
voice: 310.455.3810, #2