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

Help coding an exit



PureBytes Links

Trading Reference Links

Hi all,

I need some help to code an exit. If you don't mind I'll step out how it 
needs to go.
If anyone has some input it would be much appreciated.

Regards,
Paul

{Indicator}
Inputs: Myposition(0), Mydate(1040101), Mytime(1530), Lookback(2), 
Insidedayz(0);

{For Long Positions}
If Myposition = 1 then begin

   {Start plotting after I enter a long position}
   If (Date = Mydate and Time >= Mytime) or Date > Mydate then begin

      {Now determine the highest close in the up move so far}

      {Count this as day 1}

      {Now go back the number of days in the input "Lookback"}

      {If input "Insidedayz = 0 then do NOT include inside days in the 
number of days to lookback}
      {If input "Insidedayz = 1 then DO inclde inside days in the number 
of days to lookback}

      {Now determine the lowest true low of those number of lookback days}

      {Plot the Lowest truelow on the screen over the chart}

   End;
End;


{Once I have this I can work out the short exit on my own without troubling 
anyone}