PureBytes Links
Trading Reference Links
|
TJ
This was working on previous AB 4.30 but it's not working now.
per=8;Buy = Trough(L,PER,1)==L;Sell = Peak(H,PER,1)==H;
EnableScript("jscript");<%function GetDays( y, m, d ){return Date.UTC(y, m - 1, d)/(1000*60*60*24);}%>
d1 = LastValue( ValueWhen( Buy, Day() ) );m1 = LastValue( ValueWhen( Buy, Month() ) );y1 = LastValue( ValueWhen( Buy, Year() ) );
d2 = LastValue( ValueWhen( Sell, Day() ) );m2 = LastValue( ValueWhen( Sell, Month() ) );y2 = LastValue( ValueWhen( Sell, Year() ) );
scr = GetScriptObject();eki=( scr.GetDays( y2, m2, d2 ) - scr.GetDays( y1, m1,d1 ) );Graph0=eki;
And also how I can make loop to assign scr.GetDays( y, m, d )
to every bar?
Thanks
ErkanDo you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|