- Katılım
- 23 Eki 2020
- Mesajlar
- 1,806
TCR - Intraday
S1:=Input("Base swing start date
(mmddyyyy)",01011800,12312100,08102004);
ST1:=Input("Base swing start time H.5M Increment (X.0-
>X.0.12)",0,24,12);
E1:=Input("Base swing end date
(mmddyyyy)",01011800,12312100,09012004);
ET1:=Input("Base swing end time H.5M Increment (X.0-
>X.0.12)",0,24,12);
P1:=Input("Project from (mmddyyyy)",01011800,12312100,09032004);
PT1:=Input("Project from time H.5M Increment",0,24,12);
SM:=Int(S1/1000000);
SD:=Int(Frac(S1/1000000)*100);
SY:=Round(Frac(PREC(S1/10000,5))*10000);
EM:=Int(E1/1000000);
ED:=Int(Frac(E1/1000000)*100);
EY:=Round(Frac(PREC(E1/10000,5))*10000);
PM:=Int(P1/1000000);
PD:=Int(Frac(P1/1000000)*100);
PY:=Round(Frac(PREC(P1/10000,5))*10000);
Sig:=If(Hour()=Ref(Hour(),-1), Minute()-Ref(Minute(),-1),If(DayOfMonth
()=Ref(DayOfMonth(),-1),Minute()-Ref(Minute(),-1)+60,If(Ref(Minute(),-
1)>Ref(Minute(),-2),Ref(Minute(),-1)-Ref(Minute(),-2),Ref(Minute(),-
2)-Ref(Minute(),-3))));
Count:=Cum(Sig);
RP:=LastValue(ValueWhen(1, PM=Month() AND PD=DayOfMonth()AND PY=Year
() AND Int(PT1)=Hour() AND Round(Frac(PT1)*100*5)=Minute(),Count));
TDR:=LastValue(ValueWhen(1, EM=Month() AND ED=DayOfMonth()AND EY=Year
() AND Int(ET1)=Hour() AND Round(Frac(ET1)*100*5)=Minute(),Count))-
LastValue(ValueWhen(1, SM=Month() AND SD=DayOfMonth()AND SY=Year()
AND Int(ST1)=Hour() AND Round(Frac(ST1)*100*5)=Minute(),Count));
If(EM=Month() AND ED=DayOfMonth()AND EY=Year() AND Int(ET1)=Hour()
AND Round(Frac(ET1)*100*5)=Minute(),0.75,0);
If(SM=Month() AND SD=DayOfMonth()AND SY=Year() AND Int(ST1)=Hour()
AND Round(Frac(ST1)*100*5)=Minute(),0.75,0);
If(Count=RP,1,0);
If(Count<=Round(RP+(TDR*0.382)) AND Ref(Count,+1)>Round(RP+
(TDR*0.382)), 0.6,0);
If(Count<=Round(RP+(TDR*0.5)) AND Ref(Count,+1)>Round(RP+(TDR*0.5)),
0.6,0);
If(Count<=Round(RP+(TDR*0.618)) AND Ref(Count,+1)>Round(RP+
(TDR*0.618)), 0.6,0);
If(Count<=Round(RP+(TDR*1)) AND Ref(Count,+1)>Round(RP+(TDR*1)),
0.6,0);
If(Count<=Round(RP+(TDR*1.618)) AND Ref(Count,+1)>Round(RP+
(TDR*1.618)), 0.6,0);
If(Count<=Round(RP+(TDR*2)) AND Ref(Count,+1)>Round(RP+(TDR*2)),
0.6,0);
If(Count<=Round(RP+(TDR*2.618)) AND Ref(Count,+1)>Round(RP+
(TDR*2.618)), 0.6,0)
{end}
kaynak
purebytes
S1:=Input("Base swing start date
(mmddyyyy)",01011800,12312100,08102004);
ST1:=Input("Base swing start time H.5M Increment (X.0-
>X.0.12)",0,24,12);
E1:=Input("Base swing end date
(mmddyyyy)",01011800,12312100,09012004);
ET1:=Input("Base swing end time H.5M Increment (X.0-
>X.0.12)",0,24,12);
P1:=Input("Project from (mmddyyyy)",01011800,12312100,09032004);
PT1:=Input("Project from time H.5M Increment",0,24,12);
SM:=Int(S1/1000000);
SD:=Int(Frac(S1/1000000)*100);
SY:=Round(Frac(PREC(S1/10000,5))*10000);
EM:=Int(E1/1000000);
ED:=Int(Frac(E1/1000000)*100);
EY:=Round(Frac(PREC(E1/10000,5))*10000);
PM:=Int(P1/1000000);
PD:=Int(Frac(P1/1000000)*100);
PY:=Round(Frac(PREC(P1/10000,5))*10000);
Sig:=If(Hour()=Ref(Hour(),-1), Minute()-Ref(Minute(),-1),If(DayOfMonth
()=Ref(DayOfMonth(),-1),Minute()-Ref(Minute(),-1)+60,If(Ref(Minute(),-
1)>Ref(Minute(),-2),Ref(Minute(),-1)-Ref(Minute(),-2),Ref(Minute(),-
2)-Ref(Minute(),-3))));
Count:=Cum(Sig);
RP:=LastValue(ValueWhen(1, PM=Month() AND PD=DayOfMonth()AND PY=Year
() AND Int(PT1)=Hour() AND Round(Frac(PT1)*100*5)=Minute(),Count));
TDR:=LastValue(ValueWhen(1, EM=Month() AND ED=DayOfMonth()AND EY=Year
() AND Int(ET1)=Hour() AND Round(Frac(ET1)*100*5)=Minute(),Count))-
LastValue(ValueWhen(1, SM=Month() AND SD=DayOfMonth()AND SY=Year()
AND Int(ST1)=Hour() AND Round(Frac(ST1)*100*5)=Minute(),Count));
If(EM=Month() AND ED=DayOfMonth()AND EY=Year() AND Int(ET1)=Hour()
AND Round(Frac(ET1)*100*5)=Minute(),0.75,0);
If(SM=Month() AND SD=DayOfMonth()AND SY=Year() AND Int(ST1)=Hour()
AND Round(Frac(ST1)*100*5)=Minute(),0.75,0);
If(Count=RP,1,0);
If(Count<=Round(RP+(TDR*0.382)) AND Ref(Count,+1)>Round(RP+
(TDR*0.382)), 0.6,0);
If(Count<=Round(RP+(TDR*0.5)) AND Ref(Count,+1)>Round(RP+(TDR*0.5)),
0.6,0);
If(Count<=Round(RP+(TDR*0.618)) AND Ref(Count,+1)>Round(RP+
(TDR*0.618)), 0.6,0);
If(Count<=Round(RP+(TDR*1)) AND Ref(Count,+1)>Round(RP+(TDR*1)),
0.6,0);
If(Count<=Round(RP+(TDR*1.618)) AND Ref(Count,+1)>Round(RP+
(TDR*1.618)), 0.6,0);
If(Count<=Round(RP+(TDR*2)) AND Ref(Count,+1)>Round(RP+(TDR*2)),
0.6,0);
If(Count<=Round(RP+(TDR*2.618)) AND Ref(Count,+1)>Round(RP+
(TDR*2.618)), 0.6,0)
{end}
kaynak
purebytes