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

Help coding an exit



PureBytes Links

Trading Reference Links

Hi All,

I know I asked the other day but I am not sure if some people may have 
missed the post. I need a hand with the following coding problem I have 
with an exit. Any help would be 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 since the input entry time}

      {Count this as bar 1}

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

      {If possible - add the next condition in}
      {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}