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

Re: Code Conversion



PureBytes Links

Trading Reference Links

This show-me plots first support and resistance:

if Date > Date[1] then Begin

   Havg = 0;
   Lavg = 0;
   Cavg = 0;

   for index = DAYSBACK downto 2 Begin

      DayHigh[index] = DayHigh[index - 1];
      DayLow[index] = DayLow[index - 1];
      DayClose[index] = DayClose[index - 1];

      Havg = Havg + DayHigh[index];
      Lavg = Lavg + DayLow[index];
      Cavg = Cavg + DayClose[index];

   End;

   DayHigh[1] =  HHigh;
   DayLow[1] =  LLow;
   DayClose[1] = Close[1];


   Havg = (Havg + DayHigh[1])/DAYSBACK;
   Lavg = (Lavg + DayLow[1])/DAYSBACK;
   Cavg = (Cavg + DayClose[1])/DAYSBACK;


{
   Havg = DayHigh[1];
   Lavg = DayLow[1];
   Cavg = DayClose[1];
}
   HHigh = High;
   LLow = Low;

end; {if}

{**********************************************************
	Every Time Periord!!!

***********************************************************}

If Date = Date[1] then begin
	If High > HHigh Then HHigh = High;
	If Low < LLow Then LLow = Low;
end;

Avg1  = (Havg + Lavg + Cavg)/3;
High1 = (2*Avg1) - Lavg;
Low1  = (2*Avg1) - Havg;
High2 = Avg1 + High1 - Low1;
Low2 = Avg1 + Low1 - High1;


Value1=(Highest(high,10) + 200 points);
Value2=(Lowest(Low,10) -  200 points);

If High1 < Value1 and High1 > Value2 then Plot1 (High1, "High1");
If Low1 < Value1 and  Low1 > Value2 then Plot2 (Low1, "Low1");
If High2 < Value1 and High2 > Value2 then Plot3 (High2, "High2");
If Low2 < Value1 and Low2 > Value2 then Plot4 (Low2, "Low 2");

{
End;
}





>From: "phil" <zxcv@xxxxxxxxxxx>
>To: <omega-list@xxxxxxxxxx>
>Subject: Code Conversion
>Date: Tue, 23 Apr 2002 14:48:59 -0400
>
>Hi List,
>
>Anyone willing to convert an indicator in TS6 format into ELA for TS4. It
>seems that when I go to verify it it's one small quirk after another. The
>solution is probably real easy but still beyond my knowledge of EL.
>
>It plots the floor traders support and resistance numbers on a daily chart.
>I wish to use it on intraday (minute and tick) charts in TS4.
>
>All cooperation is welcome.
>
>Thanks in advance,
>
>Phil
>
>