vielen Dank - SK scheint zu funktionieren - kurz und knackig
 -  und für den Zeitkanal gibts ja den anderen
  -  und für den Zeitkanal gibts ja den anderen  
 LG Peter
 -  und für den Zeitkanal gibts ja den anderen
  -  und für den Zeitkanal gibts ja den anderen  
  
 Code: Select all
Express SRTimeChannelCut
Vars
series  xPo, xPc;
numeric Lo1, Lo2 , Hi1, Hi2 ;
series xHi, xLo, xxHi, xxLo, xxPo, xxPc;
numeric MinLo,MaxHi, iHi, iLo ,iPo, iPc, iipO, iipC;
input $am (000,2359,1430) , $pm (000,2359,2100);
Series xPivot, xR1,xR2,xR3 , xS1,xS2,xS3;
Numeric Pivot, R1,R2,R3 , S1,S2,S3;
input $left (000,2359,1430) , $right (000,2359,2100);
numeric xxLeft , xxRight ;
Calculation 
Calculateateverytick(false);
//High , Low
if IsNewDay() then
   begin
      MaxHi = 0;  MinLo = 20000; 
      Hi1 = void;   Lo1 = void;   Hi2 = void;  Lo2 = void;
   end
else if (timeOpen < NumericToTime($am)) then
   begin
      Hi1 = void;  Lo1 = void;  Hi2 = void;  Lo2 = void;                        
   end
else if (timeOpen < NumericToTime($pm)) then
   begin
     MaxHi = Max(MaxHi, High);   MinLo = Min(MinLo, Low);
     Hi1 = MaxHi;  Lo1 = MinLo;  Hi2 = void;  Lo2 = void; 
   end
else
   begin 
     Hi1 = void;   Lo1 = void;  Hi2 = void;  Lo2 = void;
   end
    xHi = MaxHi;  xLo = MinLo;
// Open , Close 
    
if timeOpen = NumericToTime($am) then 
    begin
      iPo = open;
    end 
    
if timeOpen = NumericToTime($pm) then 
    begin
      iPc = close;
    end
  xpO = iPo;
  xpC = iPC;
  
  
// Open , High , low , Close (Day before) 
If IsNewDay() then
  begin
    iPO = void;   iPC = void;
    iHi = xHi[1];  iLo = xLo[1];  iipO = xpO[1];  iipC = xpC[1]; 
  end
  xxHi = iHi;
  xxLo = iLo;
  xxpO = iipO;
  xxPc = iipC;
// Erase the vertical line at the end of the day
if xxHi = 0 then xxHi = void;
if xxLo = 20000 then xxLo = void;
if xxHi <> xxHi[1] then xxHi[1] = void;
if xxLo <> xxLo[1] then xxLo[1] = void;
if xxpO <> xxpO[1] then xxpO[1] = void;
if xxPc <> xxPc[1] then xxPc[1] = void;
// Highlight Time Channel
if (timeOpen >= NumericToTime($am)) and (timeOpen <= NumericToTime($pm)) then 
HighlightRGB("slot",109,116,155);
// Calculate the pivot , supports and resistances
If IsNewDay() then 
begin
  xR1[1] = void;  xR2[1] = void;  xR3[1] = void;
  xS1[1] = void;  xS2[1] = void;  xS3[1] = void;
  xPivot[1] = void;
  
  
  Pivot = (xxHi+xxlo+xxPc)/3;
  R1 = (2*Pivot)-xxlo;
  R2 = Pivot+(xxHi-xxlo);
  R3 = 2*(Pivot-xxlo)+xxHi;
  S1 = (2*Pivot)-xxHi;
  S2 = Pivot-(xxHi-xxlo);
  S3 = xxlo-(2*(xxHi-Pivot));
end
// Erase the overage on the left and right
xxLeft = $left ; xxRight = $right ; 
if (time <= NumericToTime(xxLeft)) then 
  begin 
  xPivot = void ; xR1 = Void  ; xR2 = void ; xR3 =Void; 
    xS1 = void ; xS2 = Void ; xS3 = void ;
  xxpO = void ; xxPc = Void  ; xxLo = void ; xxHi =Void; 
  end
if (time >= NumericToTime(xxRight)) then 
  begin xPivot = void ; 
  xPivot = void ; xR1 = Void  ; xR2 = void ; xR3 =Void; 
    xS1 = void ; xS2 = Void ; xS3 = void ;
  xxpO = void ; xxPc = Void  ; xxLo = void ; xxHi =Void; 
  end
if (time >= NumericToTime(xxLeft)) and (time <=NumericToTime(xxRight)) then 
  begin 
  xPivot = Pivot ; xR1 = R1  ; xR2 = R2 ; xR3 = R3; 
    xS1 = S1 ; xS2 = S2 ; xS3 = S3 ;
  xxpO = iipO ; xxPc = iipC  ; xxLo = iLo ; xxHi = iHi; 
  end
Interpretation 
begin
end
plot (xxpO, lightblue, 2);
plot (xxPc, blue, 2);
plot (xxLo, red, 2);
plot (xxHi, green, 2);
plot (xpivot, black, 2);
plot (xR1, grey, 1);
plot (xR2, grey, 1);
plot (xR3, grey, 1);
plot (xS1, grey, 1);
plot (xS2, grey, 1);
plot (xS3, grey, 1);