Page 1 of 1

Need Help with radar screen indicator

Posted: Thu Jan 03, 2008 5:33 am
by bbrodka
Can anyone help me get this indicator to also work in radar Screen?
Thanks in advance



Code: Select all

[LegacyColorValue = true];

{ TrendCount Indicator
   Written by: HamFon
   Contact:   ncrowle@sprintmail.com
   Date:      08/01/2002, first version 08/01/2002
   Version:   1.00
   Status:      Gnu Public License - this indicator may be used or shared freely with
            no fee, as long as this original header comment is included.
   Purpose:   Displays chart of percentage higher and lower prices, back specified length.
            A value of 100 means that all prices preceding were smaller (uptrend),
            a value of 0 means that all prices preceding were larger (downtrend),
            a value of 50 means that half of the prices were larger, half smaller.
}

inputs: Price (Close), Length (20);
variables: loop (0), LargerCount (0), SmallerCount (0);

if CurrentBar > Length then begin
   SmallerCount = 0;
   LargerCount = 0;
   for loop = 1 to Length begin
      if Price < Price[loop] then SmallerCount = SmallerCount + 1;
      if Price > Price[loop] then LargerCount = LargerCount + 1;
   end;
   Plot1 (((LargerCount - SmallerCount) / Length + 1) * 50, "TrendCount");
end;

Posted: Thu Jan 03, 2008 7:29 am
by bbrodka
I figured it out

RadarScreen, by default, only loads the current bar. If you want to detect when the pattern occurred on past bars, you would set the Load additional data for accumulative calculations setting of the indicator. From the Format Properties pages, General tab, you would check the Load additional box, and enter a value for the number of additional bars (days for a daily interval) that you want to load.

To scan back 400 additional days, for example, set the value to 400.
Image