- Katılım
- 23 Eki 2020
- Mesajlar
- 1,828
Accumulates OBV/Volume (or any other signals) between & including two user-input dates. |
|
Signal Accumulator { Accumulates OBV/Volume (or any other signals) between & including two user-input dates } { (C) Copyright 2003-2004 Jose Silva } { http://www.metastocktools.com } {signal to accumulate - OBV} x:=If(C>Ref(C,-1),V,If(C<Ref(C,-1),-V,0)); {signal to accumulate - Volume} {x:=V;} StDay:=Input("Start Day",1,31,1); StMnth:=Input("start Month",1,12,10); StYear:=Input("start Year",1960,2060,2003); EnDay:=Input("End Day",1,31,31); EnMnth:=Input("end Month",1,12,10); EnYear:=Input("end Year",1960,2060,2003); start:=Year()>StYear OR (Year()=StYear AND (Month()>StMnth OR Month()=StMnth AND DayOfMonth()>=StDay)); end:=Year()<EnYear OR (Year()=EnYear AND (Month()<EnMnth OR Month()=EnMnth AND DayOfMonth()<=EnDay)); period:=start AND end; If(period,Cum(If(period,x,0)),0) |
Source / From: |