diff --git a/pkgdown.yml b/pkgdown.yml index c64d8bc9..4d11eb70 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -6,7 +6,7 @@ articles: strategies: strategies.html utilities: utilities.html xoanda: xoanda.html -last_built: 2024-09-11T22:15Z +last_built: 2024-09-11T22:33Z urls: reference: https://shikokuchuo.net/ichimoku/reference article: https://shikokuchuo.net/ichimoku/articles diff --git a/reference/archive.html b/reference/archive.html index 8366ca55..5743c703 100644 --- a/reference/archive.html +++ b/reference/archive.html @@ -121,11 +121,11 @@

Examplesfile <- tempfile() archive(cloud, file) -#> Archive written to '/tmp/RtmpuIqvJ3/file16f534b6d515' +#> Archive written to '/tmp/RtmpK9knIu/file16dc22295b3a' #> SHA256: f04ccb6b8869372733acb7ad07d468624e58b1b8ee9d6a715ab13e698fd1373b restored <- archive(file) -#> Archive read from '/tmp/RtmpuIqvJ3/file16f534b6d515' +#> Archive read from '/tmp/RtmpK9knIu/file16dc22295b3a' #> Data verified by SHA256: f04ccb6b8869372733acb7ad07d468624e58b1b8ee9d6a715ab13e698fd1373b unlink(file) diff --git a/search.json b/search.json index 72bd0466..867edc16 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement code@hibiki-ai.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.0, available https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"definition","dir":"Articles","previous_headings":"Ichimoku Kinko Hyo","what":"Definition","title":"ichimoku: Cloud Charts - The Reference Manual","text":"一目均衡表 Ichimoku Kinko Hyo [cloud chart] consists following lines added candlestick chart: 転換線 Tenkan-sen [conversion line]: mid-point highest high lowest low past 9 periods (including current period) 基準線 Kijun-sen [base line]: mid-point highest high lowest low past 26 periods (including current period) 先行スパン 1 Senkou span [leading span ]: mid-point Tenkan-sen Kijun-sen plotted ahead 26 periods (including current period) 先行スパン 2 Senkou span B [leading span B]: mid-point highest high lowest low past 52 periods (including current period), plotted ahead 26 periods (including current period) 遅行スパン Chikou span [lagging span]: current period closing price plotted behind 26 periods (including current period) 雲 kumo [cloud] area bounded Senkou span Senkou span B (usually shaded chart).","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"interpretation","dir":"Articles","previous_headings":"Ichimoku Kinko Hyo","what":"Interpretation","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Ichimoku Kinko Hyo can translated ‘one-glance equilibrium chart’. designed allow price action market structure financial securities determined visually ‘--glance’. example strongly upwards-trending market, current candlesticks Tenkan-sen, Kijun-sen, turn cloud, Chikou span may anything . lines cloud represent dynamic support resistance zones relative price candles. Generally, thicker cloud, tougher support/resistance. previous example, price now reverts downwards, can expect support first Tenkan-sen, Kijun-sen finally cloud . price enters cloud, .e. cloud base cloud top, important area gauge whether sufficient momentum price break cloud whether cloud eventually provokes reversal. subtle interpretations involve Chikou span particular action relation cloud lines well candles. outside scope vignette provide full tutorial use Ichimoku Kinko Hyo.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"context","dir":"Articles","previous_headings":"Ichimoku Kinko Hyo","what":"Context","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Ichimoku analysis latest refinement candlestick charting techniques, also originated Japan. Developed 一目山人 Ichimoku, Sanjin, alias 細田吾一 Hosoda, Goichi, work published 1969 seminal 「一目均衡表」 [ichimoku kinkou hyou]. gained popularity Japan especially publication Sasaki’s 「一目均衡表の研究」 [ichimoku kinkouhyou kenkyuu] 1996, now widely-used technical analysis worldwide. ichimoku time periods traditionally calculated 9, 26 52 based manual data analysis performed Japan pre-computer age 6-day working week resulting 26 average trading days month. Although bears little resemblance current day, use time periods persisted ‘accepted practice’. use periods meaningless sense ‘market psychology’ can often create realities, independent fundamentals. However, reason technique evolve, reflect changing trading realities perhaps parameters become relevant collective psychology. reason, length periods can set parameters ‘ichimoku’ package. However please caution note using periods invalidates traditional interpretations Ichimoku Kinko Hyo. Finally, use originated daily candlesticks, valid interpretation remains daily data. However, equally used today shorter, e.g. 4-hour hourly, longer, e.g. weekly monthly, charts.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"a-typical-workflow","dir":"Articles","previous_headings":"","what":"A Typical Workflow","title":"ichimoku: Cloud Charts - The Reference Manual","text":"","code":"library(ichimoku)"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"data","dir":"Articles","previous_headings":"A Typical Workflow","what":"Data","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku works data frames tabular data. ichimoku() function handles input xts, data.frame, data.table, tibble, matrix, data.frame compatible objects. ichimoku incorporates interface OANDA fxTrade API return data major currencies, metals, commodities, government bonds stock indices. Please refer OANDA vignette. ichimoku designed fully pipeable interfaces well R packages return financial data, indeed OANDA functions package :","code":"# ichimoku can create clouds directly from OANDA data, for example: cloud <- ichimoku(oanda(\"USD_JPY\")) # Using R 4.1's new pipe operator: oanda(\"USD_JPY\") |> ichimoku() |> plot() # Or equally using the 'magrittr' pipe: oanda(\"USD_JPY\") %>% ichimoku() %>% plot()"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"input-data-requirements","dir":"Articles","previous_headings":"A Typical Workflow > Data","what":"Input data requirements","title":"ichimoku: Cloud Charts - The Reference Manual","text":"requirement input data minimal: series prices indexed valid timestamps. Date-time index POSIXct format convertible POSIXct column name containing ‘date’, ‘time’ ‘index’, else row names dataset Open/High/Low/Close (OHLC) data always used available. columns names containing ‘open’, ‘high’, ‘low’ ‘close’. searched regular expression patterns column names. details see section data validation HLC price data available, opening price taken closing price previous period. means candlesticks accurate, calculation cloud lines affected Single series price data can also used producing pseudo cloud chart , example, OHLC data available price calculated price VWAP. HLC data found dataset, search proceed single series price data columns names containing ‘price’, ‘value’, ‘close’ pseudo-OHLC series constructed single price. done assigning opening price closing price previous period, high low max min respectively opening closing prices constructed OHLC series contain real high/low values, ichimoku cloud chart calculated way accurate serves approximation Note data retrieval: optimal retrieve data starting back period analysed. certain cloud lines calculated using 52 values plotted ahead 26 periods, hence full chart ichimoku cloud values 78th observation onwards (using default cloud periods). Call ichimoku() full dataset subset data window plotting ensure full cloud entire chart.","code":"# Sample OHLC price data is assigned to data frame 'TKR': TKR <- sample_ohlc_data head(TKR) #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"ichimoku","dir":"Articles","previous_headings":"A Typical Workflow","what":"ichimoku()","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku() main function ichimoku package. takes input data object returns ichimoku object, inherits classes ‘ichimoku’, ‘xts’ ‘zoo’. details, please refer ichimoku object specification. Optional arguments: ticker ticker identify instrument, otherwise set name input object periods [default c(9, 26, 52)] vector defining length periods used cloud. parameter normally modified using values invalid context traditional Ichimoku analysis ... additional arguments, instance ‘holidays’, passed along tradingDays() calculating future cloud daily data keep.data set TRUE retain additional data present input object additional columns /attributes. Note: columns numeric type type coercible numeric preserved, otherwise NAs introduced. returned output designed fit screen; call () display rows entire object. Note , print called setting ‘plot = FALSE’ return data console. default print method ichimoku objects also plots cloud chart graphical device. Use str() compact display object structure: summary method using summary() also provide brief description data: ichimoku object inherits ‘xts’ ‘zoo’ classes, existing methods classes work seamlessly. Please refer section Working ichimoku objects.","code":"cloud <- ichimoku(TKR) print(cloud, plot = FALSE, width = 180) #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB chikou cloudT cloudB #> 2020-01-02 123.0 123.1 122.5 122.7 -1 NA NA NA NA 122.8 NA NA #> 2020-01-03 122.7 122.8 122.6 122.8 1 NA NA NA NA 122.9 NA NA #> 2020-01-06 122.8 123.4 122.4 123.3 1 NA NA NA NA 123.0 NA NA #> 2020-01-07 123.3 124.3 123.3 124.1 1 NA NA NA NA 123.9 NA NA #> 2020-01-08 124.1 124.8 124.0 124.8 1 NA NA NA NA 123.6 NA NA #> 2020-01-09 124.8 125.4 124.5 125.3 1 NA NA NA NA 122.5 NA NA #> 2020-01-10 125.3 125.3 124.8 125.2 -1 NA NA NA NA 122.6 NA NA #> 2020-01-13 125.2 125.3 125.1 125.2 0 NA NA NA NA 123.0 NA NA #> 2020-01-14 125.2 125.2 124.3 124.4 -1 123.90 NA NA NA 123.1 NA NA #> 2020-01-15 124.4 124.5 123.7 123.9 -1 123.90 NA NA NA 122.1 NA NA #> 2020-01-16 123.9 124.4 123.8 124.2 1 123.90 NA NA NA 121.9 NA NA #> 2020-01-17 124.2 124.3 123.0 123.5 -1 124.20 NA NA NA 121.1 NA NA #> 2020-01-20 123.5 123.8 123.1 123.2 -1 124.20 NA NA NA 121.4 NA NA #> 2020-01-21 123.6 123.6 123.4 123.6 0 124.20 NA NA NA 121.5 NA NA #> 2020-01-22 123.5 124.0 123.3 123.5 0 124.15 NA NA NA 121.9 NA NA #> 2020-01-23 123.5 124.5 123.3 124.3 1 124.15 NA NA NA 120.9 NA NA #> 2020-01-24 124.3 124.4 124.0 124.2 -1 124.10 NA NA NA 121.0 NA NA #> 2020-01-27 124.2 124.2 122.7 123.0 -1 123.60 NA NA NA 120.8 NA NA #> 2020-01-28 123.0 123.6 122.7 123.1 1 123.60 NA NA NA 121.2 NA NA #> 2020-01-29 123.1 123.3 123.1 123.2 1 123.60 NA NA NA 121.6 NA NA #> 2020-01-30 123.2 123.2 122.8 123.1 -1 123.60 NA NA NA 121.1 NA NA #> 2020-01-31 123.1 123.5 123.0 123.2 1 123.60 NA NA NA 122.1 NA NA #> 2020-02-03 123.2 123.3 122.6 123.0 -1 123.55 NA NA NA 122.2 NA NA #> 2020-02-04 123.0 123.1 122.6 122.9 -1 123.55 NA NA NA 122.2 NA NA #> 2020-02-05 122.9 123.2 122.6 122.8 -1 123.50 NA NA NA 122.4 NA NA #> 2020-02-06 122.8 122.9 122.8 122.8 0 123.40 123.90 NA NA 122.4 NA NA #> [ reached getOption(\"max.print\") -- omitted 27 rows ] str(cloud) #> ichimoku object [2020-01-02 / 2021-02-01] (281, 12) #> $open $high $low $close $cd $tenkan $kijun $senkouA $senkouB $chikou $cloudT $cloudB #> index: 2020-01-02 ... 2021-02-01 #> attributes: #> periods: 9 26 52 #> periodicity: 1 days #> ticker: TKR summary(cloud) #> ichimoku object with dimensions (281, 12) #> #> Max: 2020-07-13 23:00:00 [139.7] #> Start: 2020-01-02 00:00:00 [123] End: 2020-12-24 00:00:00 [136] #> Min: 2020-05-12 23:00:00 [119.1] #> #> Cloud periods: 9 26 52 #> Periodicity: 1 days #> Ticker: TKR"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"ichimoku-ichimoku","dir":"Articles","previous_headings":"A Typical Workflow > ichimoku()","what":"ichimoku.ichimoku()","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku() may used ichimoku object re-calculate cloud values using price data contained within. ‘ticker’ specified argument, overwrite ticker stored original ichimoku object. Calling ichimoku() ichimoku object containing strategy return ichimoku object original state without strategy unless keep.data = TRUE specified. See strategies vignette information strategies.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"preserving-data","dir":"Articles","previous_headings":"A Typical Workflow > ichimoku()","what":"Preserving Data","title":"ichimoku: Cloud Charts - The Reference Manual","text":"input object may contain additional data required ichimoku analysis, volume etc. retain data ichimoku object, specify keep.data = TRUE calling ichimoku(). consolidates relevant data single object. additional data can now also plotted sub-plot beneath main ichimoku cloud chart (see custom sub-plots). Note: numeric data data coercible numeric type preserved way, types introduce NAs. core data ichimoku object numeric matrix support multiple data types. Custom attributes set input object (timestamp data source) also preserved.","code":"kumo <- ichimoku(TKR, keep.data = TRUE) kumo[, \"volume\"] #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> volume #> 2020-01-02 1875 #> 2020-01-03 1479 #> 2020-01-06 1792 #> 2020-01-07 1977 #> 2020-01-08 2239 #> 2020-01-09 1842 #> 2020-01-10 2548 #> 2020-01-13 2946 #> 2020-01-14 2796 #> 2020-01-15 2879 #> 2020-01-16 2983 #> 2020-01-17 4080 #> 2020-01-20 3584 #> 2020-01-21 2511 #> 2020-01-22 2805 #> 2020-01-23 2853 #> 2020-01-24 2738 #> 2020-01-27 1962 #> 2020-01-28 2795 #> 2020-01-29 2850 #> 2020-01-30 2545 #> 2020-01-31 2608 #> 2020-02-03 2739 #> 2020-02-04 3456 #> 2020-02-05 4037 #> 2020-02-06 4092 #> [ reached getOption(\"max.print\") -- omitted 27 rows ]"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"defining-custom-holidays","dir":"Articles","previous_headings":"A Typical Workflow > ichimoku()","what":"Defining custom holidays","title":"ichimoku: Cloud Charts - The Reference Manual","text":"calculating future cloud daily data, ichimoku() makes call tradingDays() helper function ensure future dates fall trading days (.e. weekends holidays). default, New Year’s Christmas day defined holidays ‘holidays’ argument specified. defaults acceptable general use. define dates non-trading days, vector custom holidays may supplied via ‘holidays’ argument ichimoku() passed tradingDays() function. relevant market trades continuously 24/7 basis, specify ‘holidays = NULL’. bypass logic tradingDays() return dates calculating future cloud.","code":"# Holidays can be specified directly via a vector of dates: ichimoku(TKR, holidays = c(\"2020-01-13\", \"2020-02-11\", \"2020-02-24\")) # Or via a functions that returns a vector of dates (e.g. from the 'timeDate' package): ichimoku(TKR, holidays = timeDate::holidayLONDON()) ichimoku(TKR, holidays = timeDate::holidayNYSE()) # For a market that trades 24/7: ichimoku(TKR, holidays = NULL)"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"working-with-ichimoku-objects","dir":"Articles","previous_headings":"A Typical Workflow > ichimoku()","what":"Working with ichimoku objects","title":"ichimoku: Cloud Charts - The Reference Manual","text":"following generic functions optimised S3 methods ichimoku objects: .data.frame() converting ichimoku object dataframe. Set argument keep.attrs = TRUE retain attributes original ichimoku object index() extract index ichimoku object vector POSIXct values coredata() extract columns ichimoku object numeric matrix shows re-create ichimoku object components: Note specifically ichimoku needs called twice - first convert matrix resulting cbind() operation, recalculate using OHLC data contained within object original data contained NAs. ticker name also set explicitly example. warning issued checking validity POSIX times, case safe ignore POSIXct values ‘index’ simply coerced numeric cbind() operation valid. additional functionality, ‘xts’ package may loaded access wide range methods available ‘xts’ objects, example changing periodicity data.","code":"index <- index(cloud) core <- coredata(cloud) cloud2 <- ichimoku(ichimoku(cbind(index, core), ticker = attr(cloud, \"ticker\"))) #> Warning: Converted numeric values in column 'index' as POSIX times - please #> check validity identical(cloud, cloud2) #> [1] TRUE"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"plot","dir":"Articles","previous_headings":"A Typical Workflow","what":"plot()","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku offers choice 2 visualization systems: static (default) interactive (reactive charts using Shiny).","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"static-plots","dir":"Articles","previous_headings":"A Typical Workflow > plot()","what":"1. Static Plots","title":"ichimoku: Cloud Charts - The Reference Manual","text":"default plot function produces static plots, advantage easily exportable pdf image formats high resolution. Call plot() ichimoku object visualize cloud chart. example demonstrates arguments can supplied customise plot. following arguments customisation shared across plot() iplot(): window (optional) indispensable proper workflow. ichimoku() run larger dataset interest visualization stage data subset window interest. Supply ISO-8601 compatible range string format used ‘xts’ objects, example range ‘2020-02-15/2020-08-15’ ‘2020-02-15/’ (15 Feb 2020) ‘/2020-08’ (end-Aug 2020) simply ‘2020’ select year 2020 ticker (optional) used supply different ticker stored ichimoku object, alternatively longer-form name text appear chart heading subtitle (optional) used specify subtitle display chart title theme [default ‘classic’] choices ‘dark’, ‘mono’, ‘noguchi’, ‘okabe-ito’ ‘solarized’. strat [default TRUE] true, periods strategy results market position shaded (ichimoku object contains strategy) strategy printed chart sustitle (otherwise specified). See strategies vignette information working strategies. type [default ‘none’] type sub-plot display beneath ichimoku cloud chart, choice ‘none’, ‘r’ ‘s’ corresponding oscillator type, ‘bar’ ‘line’ custom plots. custom (optional) character string (containing regular expression) matching column name variable displayed sub-plot. Specify type = 'bar' type = 'line', otherwise type settings take precedence. plot() takes additional parameters follows: ... additional arguments passed along print method ‘ggplot’ objects type = 'none'. plot() also permits user-defined theme, case vector 12 colour values (hex codes names) supplied. colour value corresponds different element chart. example, ‘mono’ theme can specified :","code":"plot(cloud, window = \"2020-05/\", ticker = \"SYM (JSE)\", subtitle = \"Sample Data Series\") c(\"#d9d9d9\", \"#d7d7d7\", \"#d1d1d1\", \"#737373\", \"#1f1f1f\", \"#b8b8b8\", \"#1a1a1a\", \"#1a1a1a\", \"#1a1a1a\", \"#ffffff\", \"#333333\", \"#1a1a1a\")"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"oscillators","dir":"Articles","previous_headings":"A Typical Workflow > plot()","what":"Oscillators","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Although Ichimoku Kinko Hyo considered complete charting system, can times useful pair oscillator. specifying type = \"r\" type = \"s\", corresponding type oscillator shown beneath main ichimoku cloud chart. R-type oscillator based formula Relative Strength Index (RSI). single line indicator look-back window ichimoku object’s medium cloud period (default 26). R-type line calculated 100 - 100 / (1 + [26] period mean open close gain / absolute value [26] period mean open close loss). Note corresponds usual RSI oscillator definition, although identical gains/losses calculated reference period’s open rather previous close. Note also R-type oscillator calculated consistently employ roll-forward mechanism based previous oscillator values like RSI. S-type oscillator based formula stochastic indicator. 2-line indicator fast slow lines look-back windows corresponding fast medium cloud periods respectively (default 9 26). fast line quicker react price changes slow line can used confirmation / divergence. fast S-type line calculated 100 times ratio closing price minus [9] period low [9] period high minus [9] period low. slow S-type line calculated 100 times ratio closing price minus [26] period low [26] period high minus [26] period low. Note difference usual stochastic oscillator definition slow line 3-period moving average fast line.","code":"# To plot an R-type oscillator: plot(cloud, type = \"r\") plot(cloud, window = \"2020-04-01/2020-12-01\", theme = \"solarized\", type = \"s\")"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"custom-sub-plots","dir":"Articles","previous_headings":"A Typical Workflow > plot()","what":"Custom Sub-plots","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Additional data preserved within ichimoku object, example volume data, can plotted sub-plot specifying ‘custom’ argument. character string supplied ‘custom’ regular expression pattern matched column name hence need match exactly, case considered. view custom sub-plot, type must specified either ‘bar’ ‘line’ type setting takes precedence (default ‘none’).","code":"plot(kumo, window = \"2020-04/2020-11\", theme = \"mono\", type = \"bar\", custom = \"volume\")"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"further-options","dir":"Articles","previous_headings":"A Typical Workflow > plot()","what":"Further Options","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Internally, ichimoku’s plot() method wrapper autoplot(). access ggplot2 object, call autoplot() directly plot() returns original ichimoku object (invisibly).","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"interactive-plots","dir":"Articles","previous_headings":"A Typical Workflow > plot()","what":"2. Interactive Plots","title":"ichimoku: Cloud Charts - The Reference Manual","text":"produce interactive plot, use ichimoku’s iplot() function, launches Shiny app. arguments optional full customisation chart can done interactively -app, including selecting time window, theme, chart type, sub-plot etc. cursor infotip provides intuitive access data: hover chart read data values given point time cursor guides provide easy calibration date/time price levels iplot() takes following additional parameters customisation: ... additional parameters passed along ‘options’ argument shiny::shinyApp(). launch.browser [default TRUE] TRUE, system’s default web browser launched automatically app started. value argument can also function call application’s URL. use default Shiny viewer RStudio, specify getOption(\"shiny.launch.browser\").","code":"# For an interactive plot: iplot(cloud)"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"implementation-notes","dir":"Articles","previous_headings":"A Typical Workflow > plot()","what":"Implementation notes","title":"ichimoku: Cloud Charts - The Reference Manual","text":"column names ichimoku object automatically populated drop-menu, selection can made view variable custom sub-plot. Chart type must set either ‘bar’ ‘line’ type setting takes precedence.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"archive","dir":"Articles","previous_headings":"A Typical Workflow","what":"archive()","title":"ichimoku: Cloud Charts - The Reference Manual","text":"completing analysis, resulting objects can stored directly disk. function archive() combines R’s native serialisation capability cryptographic verification data integrity. Archive files created function stored native RData format maximum portability reliability. may read using base R load() function machines without ‘ichimoku’ installed.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"writing","dir":"Articles","previous_headings":"A Typical Workflow > archive()","what":"Writing","title":"ichimoku: Cloud Charts - The Reference Manual","text":"archive() write operations take 2 arguments: object written, file path/name file stored. second argument left empty, system dialog opened allowing file save location set interactively. confirmation printed console file written.","code":"# Write object to file: archive(object, \"path/filename\") # Leave second argument empty to choose file save location from a system dialog: archive(object, )"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"reading","dir":"Articles","previous_headings":"A Typical Workflow > archive()","what":"Reading","title":"ichimoku: Cloud Charts - The Reference Manual","text":"archive() read operations takes single argument: file path/name file read. Alternatively, arguments specified, system dialog opened allowing file chosen interactively. return value function can assigned object. confirmation printed console file read.","code":"# Read from file to object: object <- archive(\"path/filename\") # Choose a file from an interactive system dialog: object <- archive()"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"data-integrity-verification","dir":"Articles","previous_headings":"A Typical Workflow > archive()","what":"Data Integrity Verification","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Data integrity verification performed SHA256 cryptographic hash algorithm ‘secretbase’ package. archive written, serialised object hashed hash also stored archive. SHA256 hash value printed console confirmation. archive read back, SHA256 hash restored object checked hash original stored archive. identical, ‘data verified’ message printed console along authenticated SHA256 hash.","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"data-validation","dir":"Articles","previous_headings":"Supplementary Information","what":"Data validation","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku performs following data validation steps attempting compute cloud values. Failure step causes ichimoku() halt. Searches column names data object first column containing ‘index’, ‘date’ ‘time’ (case-dependent). found: attempt convert column POSIXct .POSIXct(). fails, check column numeric convert POSIXct assuming numeric value valid unix/POSIX time (warning issued check validity case numeric value valid POSIX time) found: attempt convert row names POSIXct .POSIXct(). fails, check row names integer values just default row names data frames, convert POSIXct assuming numeric value valid unix/POSIX time (warning issued check validity POSIX times constructed way) Note: ‘xts’ objects always indexed valid timestamp ichimoku handles automatically Searches HLC price data columns names containing ‘high’, ‘low’ ‘close’ (case-dependent) respectively found: Searches opening price data column name containing ‘open’ (case-dependent) found sets opening prices closing prices previous period found: Searches single price series columns names containing ‘price’, ‘value’ ‘close’ (case-dependent), pseudo-OHLC series reconstructed Checks dataset longer medium cloud period. case none cloud lines can calculated may however still issues input data prevent cloud values computed, handled explicitly ichimoku(). example, : date-time index headerless column, column name contain ‘index’, ‘date’ ‘time’ (case-dependent). Please rename column ‘index’ cases correct date-time index row names, index ‘xts’ object, also columns contains word ‘index’, ‘date’ ‘time’. Please rename columns serve date-time index correct date-time index can detected one column contains word ‘index’, ‘date’ ‘time’. Please either rename columns serve date-time index, move correct date-time column ahead columns picked first HLC price data contained headerless columns columns labelled, example, ‘Op’, ‘Hi’, ‘Lo’, ‘Cl’. Please rename columns ‘open’, ‘high’, ‘low’ ‘close’ cases NA values within price data. affect algorithm calculating cloud lines window immediately following NA values. Please check data manually correct NA values invoking ichimoku()","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"ichimoku-object-specification","dir":"Articles","previous_headings":"Supplementary Information","what":"ichimoku object specification","title":"ichimoku: Cloud Charts - The Reference Manual","text":"index(object) - date-time index [POSIXct] object$open - opening price $high - high price $low - low price $close - closing price $cd - candle direction (-1 = , 0 = flat, 1 = ) $tenkan - Tenkan-sen $kijun - Kijun-sen $senkouA - Senkou span $senkouB - Senkou span B $chikou - Chikou span $cloudT - cloud Top (max senkouA, senkouB) $cloudB - cloud Base (min senkouA, senkouB) attributes(object)$periods - parameters used calculate cloud [integer vector length 3] $periodicity - periodicity data seconds [numeric] $ticker - instrument identifier [character]","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"since-version-0-x","dir":"Articles","previous_headings":"Supplementary Information > API modifications","what":"Since version 0.x","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku objects created v0.x longer accepted v1.0.0 later package. ensure compatibility ichimoku object specification v1, please upgrade latest package version run ichimoku() previously-created objects re-create according new specification (data preserved)","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"dependencies","dir":"Articles","previous_headings":"","what":"Dependencies","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku currently following external package dependencies: ggplot2 - graphics visualization shiny - interactive live visualizations xts, zoo - enhanced time series methods mirai - running applications background processes nanonext - interfacing external APIs secretbase - verifying data integrity archived objects RcppSimdJson - parsing data received external APIs Optional (enables additional features): keyring - saving API keys system credential store","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Sasaki, H. 佐々木 英信 (1996), 一目均衡表の研究 [ichimoku kinkouhyou kenkyuu]. Tokyo, Japan: Toushi Radar.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"multiple ways work Ichimoku Kinko Hyo strategies using ichimoku R package. First foremost visually, functions visualization described reference vignette. However, performing analysis data directly, complications ichimoku system can quickly become apparent. Chikou span particular poses challenge position indicator needs mapped relation chart elements 26 periods previously, however affects trading decisions present point time. ‘strategy layer’ ichimoku package aims prepare data standardized format ease analysis. Short strategy summaries generated automatically, designed serve quick reference rather replacement full backtest using package ‘PerformanceAnalytics’. autostrat() function used facilitate idea generation, leverages computational capability R simultaneously test valid indicator combinations. Risk warning: past results necessarily indicative future performance, always considered within context comprehensive risk analysis framework.","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"use-ichimoku","dir":"Articles","previous_headings":"Working with Strategies","what":"1. Use ichimoku()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"create ichimoku object price data.","code":"# Simulated OHLC pricing data is assigned to data frame 'TKR': TKR <- sample_ohlc_data cloud <- ichimoku(TKR)"},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"a--simple-strategies-using-strat","dir":"Articles","previous_headings":"Working with Strategies","what":"2a. Simple strategies using strat()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"test simple strategy indicator condition form ‘long (short) c1 > c2’. ‘c1’ ‘c2’ quoted column names ichimoku object representing either candlestick values e.g. ‘close’ cloud values e.g. ‘tenkan’. Note: indicator condition remains form c1 > c2 even short trades. Hence please take care, example, inverting ‘long close > tenkan’ ‘short close < tenkan’, actually formulated ‘short tenkan > close’. use strat() returns augmented ichimoku object. printout slice object (rows 100 105) shows following columns appended: $cond: ‘1’ indicator condition met close time period (note: indicator condition involves chikou span, comparison past periods) $posn: ‘1’ represents position held time period (.e. ‘open’ ‘close’) $txn: ‘1’ represents transaction enter new position, ‘-1’ represents transaction exit existing position. transactions assumed happen ‘open’ respective period $logret: log returns ‘open’ price period ‘open’ price next period. avoidance doubt, ‘log returns’ means natural logarithm difference prices $slogret: log returns strategy. simply logret * posn, .e. returns position held $ret: discrete returns ‘open’ price period ‘open’ price next period. avoidance doubt, calculated e raised power ‘logret’ minus 1 $sret: discrete returns strategy. simply ret * posn, .e. returns position held Note: following assumptions apply strategies: confirmation whether condition satisfied received ‘close’ particular period transaction initiated immediately following ‘open’ transactions conducted opening prices events aligned correct time periods, taken ‘open’ ‘close’ inclusive period: ‘cond’ refers condition satisfied ‘close’ period ‘posn’ refers whether position held ‘close’ period ‘txn’ refers transaction period (occurring ‘open’)","code":"strat <- strat(cloud, c1 = \"cloudB\", c2 = \"kijun\") print(strat[100:105, ], plot = FALSE) #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB #> 2020-05-19 23:00:00 122.7 122.7 121.8 122.4 -1 121.05 123.90 125.675 124.85 #> 2020-05-20 23:00:00 122.4 122.6 121.1 121.9 -1 121.05 123.90 125.675 124.85 #> 2020-05-21 23:00:00 121.9 123.7 121.7 123.3 1 121.40 123.80 125.675 124.85 #> 2020-05-24 23:00:00 123.3 124.0 123.0 124.0 1 121.55 123.80 125.675 124.85 #> 2020-05-25 23:00:00 124.2 124.3 124.0 124.1 -1 121.75 123.65 125.975 124.85 #> 2020-05-26 23:00:00 124.1 124.1 123.4 123.9 -1 122.25 123.65 126.475 124.85 #> chikou cloudT cloudB cond posn txn logret #> 2020-05-19 23:00:00 135.1 125.675 124.85 1 1 0 -0.0024479816 #> 2020-05-20 23:00:00 135.6 125.675 124.85 1 1 0 -0.0040933336 #> 2020-05-21 23:00:00 134.5 125.675 124.85 1 1 0 0.0114193737 #> 2020-05-24 23:00:00 134.3 125.675 124.85 1 1 0 0.0072727593 #> 2020-05-25 23:00:00 135.9 125.975 124.85 1 1 0 -0.0008054773 #> 2020-05-26 23:00:00 135.2 126.475 124.85 1 1 0 -0.0016129036 #> slogret ret sret #> 2020-05-19 23:00:00 -0.0024479816 -0.002444988 -0.002444988 #> 2020-05-20 23:00:00 -0.0040933336 -0.004084967 -0.004084967 #> 2020-05-21 23:00:00 0.0114193737 0.011484824 0.011484824 #> 2020-05-24 23:00:00 0.0072727593 0.007299270 0.007299270 #> 2020-05-25 23:00:00 -0.0008054773 -0.000805153 -0.000805153 #> 2020-05-26 23:00:00 -0.0016129036 -0.001611604 -0.001611604"},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"b--complex-strategies-using-strat","dir":"Articles","previous_headings":"Working with Strategies","what":"2b. Complex strategies using strat()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"Complex strategies can created strat() simply supplying ‘c3’ ‘c4’ function. quoted column names ichimoku object form second part indicator condition. create desired complex strategy, argument ‘type’ must also specified. default set 2, means strategy combined strategy formulated ‘c1 > c2 & c3 > c4’, conditions must satisfied. ‘type’ set 3, strategy formulated asymmetric strategy ‘c1 > c2 x c3 > c4’, ‘c1 > c2’ used position entry indicator, ‘c3 > c4’ position exit indicator. Note: strategy , example, ‘close > tenkan x tenkan > close’, equivalent simple strategy ‘close > tenkan’ identical due strict inequality. former, situation ‘close = tenkan’ trigger position exit latter ","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"view-strategy-summary-with-summary","dir":"Articles","previous_headings":"Working with Strategies","what":"3. View strategy summary with summary()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"summary strategy saved attribute ichimoku object can accessed summary() method ichimoku objects. summary designed provide quick overview whether strategy effective / desirable: Strategy returns compared benchmark, simply holidng position throughout period Comparing returns combined total periods market can help determine strategy substantially different just taking market risk Total trades along average trade length can used filter undesirable strategies -trade Trade success % helps characterise consistency strategy whether relies small percentage outsize returns return worst-performing trade provides measure downside risk See strategy summary specification details reported measures.","code":"summary(strat) #> [,1] #> Strategy \"cloudB > kijun\" #> --------------------- \"----------\" #> Strategy cuml return % 14.09 #> Per period mean ret % 0.0741 #> Periods in market 46 #> Total trades 3 #> Average trade length 15.33 #> Trade success % 100 #> Worst trade ret % 3.4 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"visualize-by-calling-plot-or-iplot-","dir":"Articles","previous_headings":"Working with Strategies","what":"4. Visualize by calling plot() or iplot().","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"periods strategy results market position now shaded ichimoku cloud chart. strategy also printed chart subtitle (otherwise specified). view original chart without strategy, simply pass argument strat = FALSE calling plot() iplot().","code":"plot(strat, theme = \"dark\")"},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"combine-strategies-using-stratcombine","dir":"Articles","previous_headings":"Working with Strategies","what":"5. Combine strategies using stratcombine()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"stratcombine() can used create custom combined strategies existing strategies contained ichimoku objects ‘s1’ ‘s2’ form ‘s1 & s2’. Note: rather combining simple strategies using stratcombine(), preferable supply 4 arguments ‘c1’, ‘c2’, ‘c3’, ‘c4’ directly strat() generate strategy ‘c1 > c2 & c3 > c4’.","code":"strat2 <- strat(cloud, \"kijun\", \"tenkan\") newstrat <- stratcombine(strat, strat2) summary(newstrat) #> [,1] #> Strategy \"cloudB > kijun & kijun > tenkan\" #> --------------------- \"----------\" #> Strategy cuml return % 11.53 #> Per period mean ret % 0.0613 #> Periods in market 27 #> Total trades 3 #> Average trade length 9 #> Trade success % 100 #> Worst trade ret % 1.78 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"further-backtesting-and-returns-analysis","dir":"Articles","previous_headings":"Working with Strategies","what":"6. Further backtesting and returns analysis","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"strategy returns saved within ichimoku object columns ‘slogret’ (strategy log returns) ‘sret’ (strategy discrete returns). benchmark returns periods saved ‘logret’ (log returns) ‘ret’ (discrete returns). ichimoku object inherits ‘xts’ class, columns may fed directly econometrics time series analysis packages ‘PerformanceAnalytics’, per example .","code":"library(PerformanceAnalytics) # To chart performance comparison of strategy vs benchmark, daily returns and drawdowns charts.PerformanceSummary(strat[, c(\"sret\", \"ret\")]) # For a table detailing drawdowns, including depth, length of recovery etc. table.Drawdowns(strat[, \"sret\"])"},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"autostrat","dir":"Articles","previous_headings":"Advanced Strategies and ML","what":"autostrat()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"analytic capability R can leveraged generate evaluate possible strategies. function designed simplicity can called ichimoku object without additional arguments. optional arguments take limited : n [default 8] number strategies return dir [default ‘long’] trade direction ‘long’ ‘short’ level [default 1] return simple strategies. complex strategies, set level = 2 return combined strategies form ‘s1 & s2’ level = 3 return asymmetric strategies form ‘s1 x s2’ quietly set TRUE, suppress printing additional output console return quietly output autostrat() list ichimoku objects. object may accessed position list e.g. [[1]] first object. metadata also saved attributes list can accessed function look(): logret: log returns combinations computed autostrat summary: strategy summaries Note: strategies returned may order strategy returns displayed strategy summaries. due fact implementation via mlgrid() simultaneously tests strategies using time interval comparability. However individual strategies run top ‘n’ strategies using available data indicators, may used comparison. Note: SenkouA, SenkouB, cloudT cloudB used conjunction indicators, possible get series similar returns cloudB > close, senkouB > close etc. Although strategies may times equivalent considered equivalent, always case results returned.","code":"autostrat(cloud, n = 3) #> [,1] [,2] #> Strategy \"senkouB > tenkan\" \"cloudB > tenkan\" #> --------------------- \"----------\" \"----------\" #> Strategy cuml return % 17.49 16.08 #> Per period mean ret % 0.0906 0.0838 #> Periods in market 63 51 #> Total trades 3 3 #> Average trade length 21 17 #> Trade success % 100 100 #> Worst trade ret % 3.64 3.16 #> --------------------- \"----------\" \"----------\" #> Benchmark cuml ret % 5.53 5.53 #> Per period mean ret % 0.0302 0.0302 #> Periods in market 178 178 #> --------------------- \"----------\" \"----------\" #> Direction \"long\" \"long\" #> Start 2020-04-19 23:00:00 2020-04-19 23:00:00 #> End 2020-12-23 2020-12-23 #> Ticker \"TKR\" \"TKR\" #> [,3] #> Strategy \"senkouB > kijun\" #> --------------------- \"----------\" #> Strategy cuml return % 14.1 #> Per period mean ret % 0.0741 #> Periods in market 64 #> Total trades 3 #> Average trade length 21.33 #> Trade success % 100 #> Worst trade ret % 3.49 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"autostrat-levels-2-and-3","dir":"Articles","previous_headings":"Advanced Strategies and ML","what":"autostrat() Levels 2 and 3","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"Set argument level = 2 autostrat() test strategies combination 2 indicator conditions, .e. strat() type = 2. Set argument level = 3 autostrat() test strategies using asymmetric combination 2 indicator conditions, .e. strat() type = 3. Note level 3 autostrat considered somewhat experimental results tend higher sensitivity data particular starting conditions.","code":"autostrat(cloud, n = 3, dir = \"short\", level = \"2\") #> [,1] #> Strategy \"close > chikou & tenkan > senkouB\" #> --------------------- \"----------\" #> Strategy cuml return % 11.21 #> Per period mean ret % 0.0597 #> Periods in market 20 #> Total trades 4 #> Average trade length 5 #> Trade success % 75 #> Worst trade ret % -0.44 #> --------------------- \"----------\" #> Benchmark cuml ret % -5.24 #> Per period mean ret % -0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"short\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> [,2] #> Strategy \"high > chikou & tenkan > senkouB\" #> --------------------- \"----------\" #> Strategy cuml return % 11.05 #> Per period mean ret % 0.0589 #> Periods in market 22 #> Total trades 4 #> Average trade length 5.5 #> Trade success % 75 #> Worst trade ret % 0 #> --------------------- \"----------\" #> Benchmark cuml ret % -5.24 #> Per period mean ret % -0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"short\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> [,3] #> Strategy \"close > chikou & tenkan > cloudB\" #> --------------------- \"----------\" #> Strategy cuml return % 10.69 #> Per period mean ret % 0.0571 #> Periods in market 24 #> Total trades 4 #> Average trade length 6 #> Trade success % 75 #> Worst trade ret % -0.44 #> --------------------- \"----------\" #> Benchmark cuml ret % -5.24 #> Per period mean ret % -0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"short\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" autostrat(cloud, n = 3, dir = \"long\", level = \"3\") #> [,1] #> Strategy \"senkouB > senkouA x kijun > low\" #> --------------------- \"----------\" #> Strategy cuml return % 2.49 #> Per period mean ret % 0.0138 #> Periods in market 59 #> Total trades 3 #> Average trade length 19.67 #> Trade success % 66.67 #> Worst trade ret % -2.49 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> [,2] #> Strategy \"senkouB > senkouA x tenkan > kijun\" #> --------------------- \"----------\" #> Strategy cuml return % 6.98 #> Per period mean ret % 0.0379 #> Periods in market 82 #> Total trades 3 #> Average trade length 27.33 #> Trade success % 100 #> Worst trade ret % 1.09 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> [,3] #> Strategy \"senkouB > high x cloudT > close\" #> --------------------- \"----------\" #> Strategy cuml return % 21.04 #> Per period mean ret % 0.1074 #> Periods in market 130 #> Total trades 4 #> Average trade length 32.5 #> Trade success % 75 #> Worst trade ret % -0.38 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"mlgrid","dir":"Articles","previous_headings":"Advanced Strategies and ML","what":"mlgrid()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"ML layer provides tools developing quantitative ichimoku solutions. mlgrid() generates numeric representation relationship ichimoku cloud chart elements, represent set stationary price features. purpose provide base grid machine learning workflows. returned object data.frame matrix ‘tidy’ format one observation per row one feature per column target ‘y’ first column. mlgrid() used power autostrat() relative() functions. 3 basic types grid shown . ‘boolean’ produces ‘1’ ‘0’ depending whether condition c1_c2 (read c1 > c2) met: ‘numeric’ produces numeric difference c1 - c2: ‘z-score’ produces standard score ‘numeric’ type grid: Note: valid combinations included within grid. combination involving ‘open’ excluded effect lagged indicator contemporaneous. following trivial highly-collinear pairs also excluded: {high, close} ,{low, close}, {low, high}, {cloudT, senkouA}, {cloudB, senkouA}, {cloudT, senkouB}, {cloudB, senkouB}, {cloudB, cloudT}. parameter ‘unique’ defaults TRUE return unique combinations c1 c2, can also set FALSE return c1 > c2 c2 > c1 situation merits. ‘y’ column can switched log discrete returns. date-time index corresponds condition met close period. return single-period return achieved transacting immediately following opening price next opening price. sense, time periods strictly match, nevertheless correctly paired. calculation returns correct pairing effectively uses 2 periods, hence order obtain grid latest available price data, y must set ‘none’, case grid returned without target variable.","code":"mlgrid(cloud, y = \"logret\", dir = \"long\", type = \"boolean\", unique = TRUE)[100:105, 1:4] #> y chikou_close chikou_high chikou_low #> 2020-10-07 23:00:00 0.0083050685 1 1 1 #> 2020-10-08 23:00:00 0.0015026299 1 1 1 #> 2020-10-11 23:00:00 0.0022497197 1 1 1 #> 2020-10-12 23:00:00 -0.0014992507 1 1 1 #> 2020-10-13 23:00:00 -0.0007504691 1 1 1 #> 2020-10-14 23:00:00 0.0037467260 1 1 1 mlgrid(cloud, y = \"ret\", dir = \"short\", type = \"numeric\", unique = FALSE)[100:105, 1:4] #> y chikou_close chikou_high chikou_low #> 2020-10-07 23:00:00 -0.0082706767 3.9 3.8 4.4 #> 2020-10-08 23:00:00 -0.0015015015 5.3 4.6 6.0 #> 2020-10-11 23:00:00 -0.0022471910 3.5 2.9 5.6 #> 2020-10-12 23:00:00 0.0015003751 5.0 3.7 6.4 #> 2020-10-13 23:00:00 0.0007507508 5.1 4.0 6.0 #> 2020-10-14 23:00:00 -0.0037397158 6.7 5.0 7.1 mlgrid(cloud, y = \"ret\", dir = \"short\", type = \"z-score\", unique = FALSE)[100:105, 1:4] #> y chikou_close chikou_high chikou_low #> 2020-10-07 23:00:00 -0.0082706767 0.4046813 0.5057896 0.3499295 #> 2020-10-08 23:00:00 -0.0015015015 0.6349143 0.6370076 0.6106195 #> 2020-10-11 23:00:00 -0.0022471910 0.3389004 0.3581693 0.5454470 #> 2020-10-12 23:00:00 0.0015003751 0.5855786 0.4893873 0.6757920 #> 2020-10-13 23:00:00 0.0007507508 0.6020238 0.5385941 0.6106195 #> 2020-10-14 23:00:00 -0.0037397158 0.8651473 0.7026165 0.7898439"},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"relative","dir":"Articles","previous_headings":"Advanced Strategies and ML","what":"relative()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"Produces statistical summary latest numeric representation ichimoku cloud chart relative historical values contained within ichimoku object. can aid determining whether current trading falls within outside normal ranges. Takes following optional arguments: order [default FALSE] set TRUE order results absolute ‘z-score’. highest values listed first signif [default 0.2] set significance threshold ‘p’ equal lower, element starred ’*’. Note: value may freely set default 0.2 arbitrary special significance quietly set TRUE, suppress printing additional output console return quietly ‘mean(X)’ mean value element X, ‘sd(X)’ standard deviation, ‘X[n]’ nth latest observed values. ‘res’ residual X[n] - mean(X) represents centred measure deviation latest observed value. ‘z-score’ (standard score) calculated res / sd(X) centred scaled measure deviation latest observed value. ‘p >= |z|’ represents empirical probability latest observed absolute ‘z-score’ greater. ’p*’ display star ‘p >= |z|’ less equal value argument ‘signif’. ‘E(|res|)|p’ represents mean expected absolute value ‘res’, conditional upon absolute ‘z-score’ greater equal latest observed absolute ‘z-score’. provides indication much ‘res’ might increase extreme cases.","code":"relative(cloud, signif = 0.4)[1:10, ] #> Latest: 2020-12-24 00:00:00 | n: 155 #> mean(X) sd(X) X[n] res z-score p >= |z| p* E(|res|)|p #> chikou_close 1.51 6.07 7.00 5.49 0.91 0.39 * 8.53 #> chikou_high 0.79 6.09 6.60 5.81 0.95 0.36 * 8.91 #> chikou_low 2.31 6.12 7.80 5.49 0.90 0.41 8.40 #> chikou_tenkan 1.73 6.15 6.90 5.17 0.84 0.41 8.70 #> chikou_kijun 2.28 5.96 4.90 2.62 0.44 0.63 6.84 #> chikou_senkouA 3.44 6.46 4.75 1.31 0.20 0.89 6.26 #> chikou_senkouB 4.26 5.40 4.35 0.09 0.02 1.00 4.76 #> chikou_cloudT 2.67 6.44 4.35 1.68 0.26 0.84 6.59 #> chikou_cloudB 5.03 5.20 4.75 -0.28 -0.05 0.99 4.60 #> close_tenkan 0.52 1.77 1.70 1.18 0.67 0.52 2.19"},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"strategy-summary-specification","dir":"Articles","previous_headings":"","what":"Strategy Summary Specification","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"--- Strategy cuml return %: (discrete) percentage return achieved pursuing strategy, assuming returns compounded. measure equivalent sum log returns converted back discrete return Per period mean ret %: percentage return () divided periods market () Periods market: number periods (days, whatever periodicity data ) market Total trades: Total number trades implement strategy. Note trade requires 2 transactions, one enter trade one exit. Note: generating benchmark return imply one trade Average trade length: Periods Market () divided total trades () Trade success %: Number trades return strictly greater zero divided total number trades Worst trade ret %: (discrete) percentage return worst-performing trade --- Benchmark cuml return %: (discrete) percentage return achieved using ‘buy hold’ strategy Per period mean ret %: percentage return () divided periods market () Periods market: number periods (days, whatever periodicity data ) ‘start’ ‘end’ dates --- Ticker: ticker saved ichimoku object Start/end: start end dates backtest. dates differ different cloud lines depending many periods takes calculate Direction: ‘long’ ‘short’ trade direction can set via argument ‘dir’. single direction strategies considered","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"Sasaki, H. 佐々木 英信 (1996), 一目均衡表の研究 [ichimoku kinkouhyou kenkyuu]. Tokyo, Japan: Toushi Radar.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"ichimoku: Auxiliary Functions","text":"vignette dedicated auxiliary functions exported ichimoku package. Note auxiliary functions programmed performance hence stripped superfluous validation error-checking code. used outside intended scopes errors may expected. particular, input types must match exactly.","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"tradingdays","dir":"Articles","previous_headings":"Core Auxiliary Functions","what":"tradingDays()","title":"ichimoku: Auxiliary Functions","text":"Used subset vector dates trading days. Note: argument ‘holidays’ passed ichimoku(), passed function calculating dates future cloud. Takes following arguments: x vector POSIXct dates. holidays (optional) vector, function outputs vector, dates defined holidays. Set NULL continuously-traded market. specified, New Year’s Christmas day defined holidays default. ... arguments used function.","code":"dates <- seq(from = as.POSIXct(\"2020-01-01\"), by = \"1 day\", length.out = 7) dates #> [1] \"2020-01-01 UTC\" \"2020-01-02 UTC\" \"2020-01-03 UTC\" \"2020-01-04 UTC\" #> [5] \"2020-01-05 UTC\" \"2020-01-06 UTC\" \"2020-01-07 UTC\" tradingDays(dates) #> [1] FALSE TRUE TRUE FALSE FALSE TRUE TRUE tradingDays(dates, holidays = c(\"2020-01-02\", \"2020-01-03\")) #> [1] TRUE FALSE FALSE FALSE FALSE TRUE TRUE tradingDays(dates, holidays = NULL) #> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE"},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"look","dir":"Articles","previous_headings":"Core Auxiliary Functions","what":"look()","title":"ichimoku: Auxiliary Functions","text":"Can used inspect informational attributes R objects. Takes object optional argument. Called without argument, .Last.value used instead. objects created ichimoku package, list attributes specific data type returned. objects, list attributes non-standard matrix / data.frame / xts objects returned, else invisible NULL none present.","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") look(cloud) #> $periods #> [1] 9 26 52 #> #> $periodicity #> [1] 86400 #> #> $ticker #> [1] \"TKR\" strat <- strat(cloud) look(strat) #> $periods #> [1] 9 26 52 #> #> $periodicity #> [1] 86400 #> #> $ticker #> [1] \"TKR\" #> #> $strat #> [,1] #> Strategy \"close > tenkan\" #> --------------------- \"----------\" #> Strategy cuml return % 8.57 #> Per period mean ret % 0.0334 #> Periods in market 138 #> Total trades 20 #> Average trade length 6.9 #> Trade success % 35 #> Worst trade ret % -2.54 #> --------------------- \"----------\" #> Benchmark cuml ret % 9 #> Per period mean ret % 0.035 #> Periods in market 246 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-01-15 #> End 2020-12-23 #> Ticker \"TKR\" grid <- mlgrid(cloud) look(grid) #> $y #> [1] \"logret\" #> #> $k #> [1] 1 #> #> $direction #> [1] \"long\" #> #> $type #> [1] \"boolean\" #> #> $ticker #> [1] \"TKR\" #> #> $means #> [1] NA #> #> $sdevs #> [1] NA"},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"xts_df","dir":"Articles","previous_headings":"Dataframe Constructors","what":"xts_df()","title":"ichimoku: Auxiliary Functions","text":"Convert ‘xts’ object ‘data.frame’. function can order magnitude faster .data.frame() ‘xts’ object. Note ichimoku objects, slightly faster, specific version implemented S3 method .data.frame(). Hence using utility ichimoku object necessary. Takes following arguments: x ‘xts’ object convert ‘data.frame’. keep.attrs (optional) set TRUE, preserve custom attributes set original object.","code":"cloud <- ichimoku(sample_ohlc_data) df <- xts_df(cloud) str(df) #> 'data.frame': 281 obs. of 13 variables: #> $ index : POSIXct, format: \"2020-01-02 00:00:00\" \"2020-01-03 00:00:00\" ... #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... # Preserving custom attributes: df2 <- xts_df(cloud, keep.attrs = TRUE) str(df2) #> 'data.frame': 281 obs. of 13 variables: #> $ index : POSIXct, format: \"2020-01-02 00:00:00\" \"2020-01-03 00:00:00\" ... #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... #> - attr(*, \"periods\")= int [1:3] 9 26 52 #> - attr(*, \"periodicity\")= num 86400 #> - attr(*, \"ticker\")= chr \"sample_ohlc_data\""},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"matrix_df","dir":"Articles","previous_headings":"Dataframe Constructors","what":"matrix_df()","title":"ichimoku: Auxiliary Functions","text":"Convert matrix ‘data.frame’. function can twice fast .data.frame() matrix. Takes following arguments: x matrix convert ‘data.frame’. keep.attrs (optional) set TRUE, preserve custom attributes set original object.","code":"cloud <- ichimoku(sample_ohlc_data) mcloud <- as.matrix(cloud) df <- matrix_df(mcloud) str(df) #> 'data.frame': 281 obs. of 12 variables: #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... str(row.names(df)) #> chr [1:281] \"2020-01-02\" \"2020-01-03\" \"2020-01-06\" \"2020-01-07\" ..."},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"df_merge","dir":"Articles","previous_headings":"Dataframe Utilities","what":"df_merge()","title":"ichimoku: Auxiliary Functions","text":"Full join arbitrary number ‘data.frame’ objects passed arguments, preserving unique entries. Can used combine historical time series data observation indexed unique timestamp periods complete. Takes arbitrary number arguments: ... data.frame objects combine. Can used join price dataframes retrieved oanda(). function designed join complete historical data. data merged contains data incomplete periods, entries preserved rather updated. incomplete periods detected within data, warning issued, resulting dataframe manually inspected case contains unwanted duplicates. Use df_append() updating dataframes new values.","code":"data1 <- sample_ohlc_data[1:6, ] data1 #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 data2 <- sample_ohlc_data[4:10, ] data2 #> time open high low close volume #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879 df_merge(data1, data2) #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879"},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"df_append","dir":"Articles","previous_headings":"Dataframe Utilities","what":"df_append()","title":"ichimoku: Auxiliary Functions","text":"Update ‘data.frame’ object new data. Can used append new updated time series data existing dataframe, observation indexed unique timestamp/identifier key column. Takes 4 arguments: old data.frame object containing existing data. new data.frame object containing new data. key [default ‘time’] column name used key provided character string. keep.attr [default ‘timestamp’] name attribute ‘new’ retain, present, provided character string. Can used update price dataframes retrieved oanda(). function designed update existing data new values become available. opposed df_merge(), data ‘new’ overwrite data ‘old’ rather create duplicates. attribute specified ‘keep.attr’ present ‘new’, example ‘timestamp’ pricing data returned oanda(), retained. attribute found ‘new’, argument effect. custom attributes dropped.","code":"data1 <- sample_ohlc_data[1:8, ] data1 #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 data2 <- sample_ohlc_data[7:10, ] data2 #> time open high low close volume #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879 df_append(data1, data2) #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"about-oanda-fxtrade","dir":"Articles","previous_headings":"","what":"About OANDA fxTrade","title":"ichimoku: The OANDA fxTrade API","text":"ichimoku provides R language interface OANDA fxTrade API. OANDA primary source foreign exchange data used investors, corporations governments globally. API can used retrieving historical live streaming price data major currencies, metals, commodities, government bonds stock indices. example available financial data: OHLC prices major forex pairs can obtained start 2005 granularity ranging 5 seconds monthly. total list 120 covered instruments please refer Available Instruments section . Please note ‘OANDA’ ‘fxTrade’ trademarks owned OANDA Corporation, entity unaffiliated ichimoku package, authors copyright holders.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"registering-with-oanda","dir":"Articles","previous_headings":"","what":"Registering with OANDA","title":"ichimoku: The OANDA fxTrade API","text":"OANDA fxTrade API, distinct OANDA data sources, based upon retail / professional trading offering name. , access API requires fxTrade account OANDA agreement API terms use. Registering ‘demo’ ‘practice’ account entirely free time writing provides full access API. registering account, following URL may used: https://www.oanda.com/forex-trading/. successful registration, link can found OANDA fxTrade account profile page ‘Manage API Access’ (Account -> Services -> Manage API Access). , personal access token use OANDA API can generated, well revoked. access token enable OANDA functions package.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"setting-your-oanda-api-key","dir":"Articles","previous_headings":"","what":"Setting your OANDA API Key","title":"ichimoku: The OANDA fxTrade API","text":"‘keyring’ package installed, OANDA API key (personal access token) can set saved system credential store using oanda_set_key(). enable retrieved automatically subsequent sessions. Separate keys can set practice live accounts; please choose correct account type prompted. access token revoked re-generated, please remember set API key oanda_set_key() function. alternative, package looks environment variable OANDA_API_KEY. present, taken OANDA API key, irrespective type account, precedence keys stored using ‘keyring’.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"using-a-live-account","dir":"Articles","previous_headings":"","what":"Using a Live Account","title":"ichimoku: The OANDA fxTrade API","text":"using access token live (real money) account, want call oanda_switch() beginning session; switches default server practice server live server. Settings persist end session. Note: package contains functions retrieving available instruments price data. contain code implement trading capability whatsoever. Please aware however, personal access token can used (outside package) operations account including placing orders trades, appropriate precautions taken using live account token.","code":"library(ichimoku) oanda_switch() #> Default OANDA server switched to 'live'"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"the-oanda-functions","dir":"Articles","previous_headings":"","what":"The OANDA Functions","title":"ichimoku: The OANDA fxTrade API","text":"OANDA functions package prefixed ‘oanda’ clarity. Functions may called interactively without arguments, e.g. oanda_stream() oanda_view(), case prompted enter required arguments; opposed specifying arguments normally, entered unquoted .e. without surrounding ““. functions, ‘instrument’ argument case-insensitive delimiter can either ’_’ ‘-’, oanda(\"USD_JPY\") oanda(\"usd-jpy\") acceptable.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda()","title":"ichimoku: The OANDA fxTrade API","text":"Retrieve pricing data OANDA fxTrade API. arguments function phrased identically API relevant: instrument string containing base currency quote currency delimited ’_’ ‘-’ (e.g. “USD_JPY” “usd-jpy”). Use oanda_instruments() function return list valid instruments granularity [default “D”] granularity price data fetch, one “M”, “W”, “D”, “H12”, “H8”, “H6”, “H4”, “H3”, “H2”, “H1”, “M30”, “M15”, “M10”, “M5”, “M4”, “M2”, “M1”, “S30”, “S15”, “S10”, “S5” count (optional) number periods return. API supports maximum 5000 individual request, defaults 500 specified. ‘’ ‘’ specified, ‘count’ ignored, time range combined ‘granularity’ determine number periods return (optional) start time range fetch price data, example “2020-02-01” (optional) end time range fetch price data, example “2020-06-30” price [default “M”] pricing component, one “M” (midpoint), “B” (bid) “” (ask) server (optional) Specify “practice” “live” server according account type held OANDA. specified, default “practice”, unless changed oanda_switch() apikey (optional) string containing OANDA fxTrade API key (personal access token). need specified already stored environment variable ‘OANDA_API_KEY’ oanda_set_key(). argument designed specifying function returns string rather string , potentially unsecure. allows packages provide secure storage secrets used preferred ‘keyring’ quietly set TRUE, suppress printing output console return quietly Note: specified request result 5000 periods returned, function prompts user confirm multiple requests submitted. Unless user response “n” “”, data proceed downloaded batches merged together single dataframe. function safe use non-interactive settings cases download proceed automatically without prompting. returned object dataframe following columns: ‘time’, ‘open’, ‘high’, ‘low’, ‘close’, ‘volume’ ‘complete’. volume used caution reflects trading volume registered OANDA may reflective broader market complete indicates whether data period complete . TRUE, values historical subject change. FALSE, period ongoing values reflect current snapshot whilst final values may may differ Important implementation notes: Incorporates automatic adjustment timestamps end period, customary financial data. means , example, today’s pricing data (incomplete trading period) today’s date expected. contrast, raw data API timestamp start period API data sometimes includes data non-trading days low volumes. common older data less recent data. may represent OTC trades occurred OANDA platform, nevertheless reflect market rates. automatically excluded data returned otherwise produce spurious results used ichimoku()","code":"oanda(\"USD_JPY\", count = 3, from = \"2010-11-01\", price = \"B\") #> time open high low close volume complete #> 1 2010-11-01 21:00:00 80.275 81.504 80.225 80.501 22291 TRUE #> 2 2010-11-02 21:00:00 80.504 80.956 80.460 80.617 13795 TRUE #> 3 2010-11-03 21:00:00 80.632 81.585 80.594 81.069 22204 TRUE"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda_chart","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda_chart()","title":"ichimoku: The OANDA fxTrade API","text":"Create updating real-time Ichimoku cloud chart. refresh rate can set chart updated every second. plot ichimoku chart price data requested output graphical device refresh interval. arguments identical oanda() addition : refresh [default 5] set refresh rate chart seconds, minimum 1 limit (optional) specify time seconds limit session. session end data returned automatically specified time elapsed ... additional parameters passed onto ichimoku() calculating ichimoku cloud autoplot() set chart parameters periods [default c(9L, 26L, 52L)] vector defining length periods used cloud. parameter normally modified using values invalid context traditional Ichimoku analysis arguments ‘’ ‘’ excluded relevant context. RStudio, please switch plots plane view chart already focus. Note periods displayed chart fewer ‘count’ specified - using default cloud periods, first 77 datapoints excluded. design ensure full cloud displayed (.e. missing values cloud lines start data). Please take account setting ‘count’ parameter. exit function, ichimoku object underlying chart returned (invisibly). allows data saved simply assigning object.","code":"# For a live Palladium price chart: oanda_chart(\"XPD_USD\") # To access the data, simply assign the return value to an object: cloud <- oanda_chart(\"XPD_USD\")"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda_studio","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda_studio()","title":"ichimoku: The OANDA fxTrade API","text":"Create interactive R Shiny session working real-time Ichimoku cloud charts. Provides live analysis environment parameters may set interactively required. cursor infotip provides ready access data directly chart. parameters can set interactively -app, oanda_studio() may called without specifying arguments. Otherwise, parameters may set beforehand way oanda_chart(). following additional parameters can used customise behaviour Shiny environment: new.process [default FALSE] TRUE, start shiny session new R process, unblocking current process allowing continued use R console. ... additional arguments passed ichimoku() calculating ichimoku cloud, autoplot() set chart parameters, ‘options’ argument shiny::shinyApp() launch.browser [default TRUE] TRUE, system’s default web browser launched automatically app started. value argument can also function call application’s URL. use default Shiny viewer RStudio, please specify getOption(\"shiny.launch.browser\")","code":"oanda_studio()"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"downloading-data","dir":"Articles","previous_headings":"The OANDA Functions > oanda_studio()","what":"Downloading Data","title":"ichimoku: The OANDA fxTrade API","text":"ichimoku object underlying live cloud chart can saved selecting Data Archive button. button uses archive() save ichimoku object disk. filename form: instrument_granularity_price.rda, e.g. SUGAR_USD_D_A.rda. confirmed, file saved browser’s default download location. Note files name overwritten instead filename made unique. read back file, use archive():","code":"# Supply the quoted file path / name, for example: cloud <- archive(\"~/Downloads/SUGAR_USD_D_A.rda\") # Or alternatively, choose the saved file interactively using a system dialog: cloud <- archive()"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda_stream","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda_stream()","title":"ichimoku: The OANDA fxTrade API","text":"Connect OANDA fxTrade streaming API stream list prices generated OANDA. arguments follows: instrument instrument stream data display [default 8L] specify integer customise number rows display console one time limit (optional) specify time seconds limit streaming session. session end data returned automatically specified time elapsed ‘server’ ‘apikey’ arguments also available required. Use ‘Esc’ key stop stream return session data. Assign return value object wish retain data. Note: messages type ‘PRICE’ processed. Messages type ‘HEARTBEAT’ consisting timestamp discarded. following noted streaming API documentation: Pricing stream include every single price created Account 4 prices sent per second (every 250 milliseconds) instrument one price created 250 millisecond window, price effect end window sent means periods rapid price movement, every price sent Pricing windows different connections stream aligned way (e.g. top second) means periods rapid price movement, different prices may observed depending alignment connection","code":"# Streaming session will end with data automatically returned after 600 secs (10 mins): data <- oanda_stream(\"UK10YB_GBP\", limit = 600) #> Streaming data... Press 'Esc' to return #> time bids asks closeoutBid closeoutAsk status tradeable instrument #> 1 2022-11-15 11:04:00 105.049, 10000 105.079, 10000 105.049 105.079 tradeable TRUE UK10YB_GBP #> 2 2022-11-15 11:04:01 105.039, 10000 105.079, 10000 105.039 105.079 tradeable TRUE UK10YB_GBP #> 3 2022-11-15 11:04:01 105.049, 10000 105.079, 10000 105.049 105.079 tradeable TRUE UK10YB_GBP #> 4 2022-11-15 11:04:04 105.059, 10000 105.089, 10000 105.059 105.089 tradeable TRUE UK10YB_GBP #> 5 2022-11-15 11:04:10 105.059, 10000 105.089, 10000 105.059 105.089 tradeable TRUE UK10YB_GBP #> 6 2022-11-15 11:04:11 105.059, 10000 105.089, 10000 105.059 105.089 tradeable TRUE UK10YB_GBP #> 7 2022-11-15 11:04:15 105.049, 10000 105.089, 10000 105.049 105.089 tradeable TRUE UK10YB_GBP #> 8 2022-11-15 11:04:15 105.049, 10000 105.079, 10000 105.049 105.079 tradeable TRUE UK10YB_GBP"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda_quote","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda_quote()","title":"ichimoku: The OANDA fxTrade API","text":"convenience function outputs console latest one-line price quote instrument. output format follows: instrument, timestamp, daily open, high, low last prices, daily percentage change (open), pricing component (M mid, B bid, ask).","code":"oanda_quote(\"USD_JPY\") #> USD_JPY 2021-10-05 16:29:44 open: 110.931 high: 111.564 low: 110.871 last: 111.398 %chg: 0.421 M"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda_view","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda_view()","title":"ichimoku: The OANDA fxTrade API","text":"Prints snapshot overview selected market, showing relative performance constituents. available markets : ‘allfx’ available currencies, ‘bonds’ government bonds, ‘commodities’ commodities, ‘fx’ major currency pairs, ‘metals’ metals ‘stocks’ global stock markets. partial matching enabled, possible type just first letter e.g. ‘c’ commodities. first retrieved timestamp pricing component printed, followed dataframe showing similar data oanda_quote() instruments selected market. data ordered daily percentage change, positive negative.","code":"oanda_view() Enter market [a]llfx [b]onds [c]ommodities [f]x [m]etals [s]tocks: c #> Retrieving commodities [..........] #> 2021-12-11 01:58:21 / M #> open high low last %chg #> NATGAS_USD 3.76200 3.9260 3.72400 3.85200 2.3923 #> BCO_USD 74.52600 76.2310 74.32600 75.88000 1.8168 #> WTICO_USD 70.91200 72.5540 70.55400 72.19000 1.8022 #> WHEAT_USD 7.67200 7.7710 7.57100 7.72700 0.7169 #> XPT_USD 930.20200 939.6000 924.29400 936.43800 0.6704 #> SOYBN_USD 12.63500 12.7580 12.58800 12.67800 0.3403 #> SUGAR_USD 0.19274 0.1948 0.19176 0.19334 0.3113 #> CORN_USD 5.89800 5.9410 5.86800 5.90200 0.0678 #> XCU_USD 4.30292 4.3479 4.26536 4.28361 -0.4488 #> XPD_USD 1805.14800 1815.1260 1729.61100 1752.81200 -2.8993"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda_orders-oanda_positions","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda_orders() / oanda_positions()","title":"ichimoku: The OANDA fxTrade API","text":"Provides summary aggregate orders/positions held OANDA fxTrade clients price level. ‘instrument’ required argument. latest order/position book retrieved unless optional argument ‘time’ used specify time retrieve order/position book. data returned dataframe, parameters saved attributes can viewed look(). chart showing percentage long short orders/positions price level output graphical device. Please note feature implemented OANDA certain major currency pairs considered experimental. Note also order book, interquartile range order levels charted orders placed far market price. returned dataframe contains full order book nevertheless.","code":"df <- oanda_positions(\"GBP_JPY\")"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"available-instruments","dir":"Articles","previous_headings":"","what":"Available Instruments","title":"ichimoku: The OANDA fxTrade API","text":"list financial instruments available account may retrieved oanda_instruments(). available instruments also automatically populated input oanda_studio(). list serves reference may differ actually available account type /country/region. Note: table saved internal package data used fallback instruments API call fails. case, warning issued per session subsequent calls return cached list.","code":"oanda_instruments() #> name displayName type #> 1 AU200_AUD Australia 200 CFD #> 2 AUD_CAD AUD/CAD CURRENCY #> 3 AUD_CHF AUD/CHF CURRENCY #> 4 AUD_HKD AUD/HKD CURRENCY #> 5 AUD_JPY AUD/JPY CURRENCY #> 6 AUD_NZD AUD/NZD CURRENCY #> 7 AUD_SGD AUD/SGD CURRENCY #> 8 AUD_USD AUD/USD CURRENCY #> 9 BCO_USD Brent Crude Oil CFD #> 10 CAD_CHF CAD/CHF CURRENCY #> 11 CAD_HKD CAD/HKD CURRENCY #> 12 CAD_JPY CAD/JPY CURRENCY #> 13 CAD_SGD CAD/SGD CURRENCY #> 14 CH20_CHF Switzerland 20 CFD #> 15 CHF_HKD CHF/HKD CURRENCY #> 16 CHF_JPY CHF/JPY CURRENCY #> 17 CHF_ZAR CHF/ZAR CURRENCY #> 18 CHINAH_HKD China H Shares CFD #> 19 CN50_USD China A50 CFD #> 20 CORN_USD Corn CFD #> 21 DE10YB_EUR Bund CFD #> 22 DE30_EUR Germany 30 CFD #> 23 ESPIX_EUR Spain 35 CFD #> 24 EU50_EUR Europe 50 CFD #> 25 EUR_AUD EUR/AUD CURRENCY #> 26 EUR_CAD EUR/CAD CURRENCY #> 27 EUR_CHF EUR/CHF CURRENCY #> 28 EUR_CZK EUR/CZK CURRENCY #> 29 EUR_DKK EUR/DKK CURRENCY #> 30 EUR_GBP EUR/GBP CURRENCY #> 31 EUR_HKD EUR/HKD CURRENCY #> 32 EUR_HUF EUR/HUF CURRENCY #> 33 EUR_JPY EUR/JPY CURRENCY #> 34 EUR_NOK EUR/NOK CURRENCY #> 35 EUR_NZD EUR/NZD CURRENCY #> 36 EUR_PLN EUR/PLN CURRENCY #> 37 EUR_SEK EUR/SEK CURRENCY #> 38 EUR_SGD EUR/SGD CURRENCY #> 39 EUR_TRY EUR/TRY CURRENCY #> 40 EUR_USD EUR/USD CURRENCY #> 41 EUR_ZAR EUR/ZAR CURRENCY #> 42 FR40_EUR France 40 CFD #> 43 GBP_AUD GBP/AUD CURRENCY #> 44 GBP_CAD GBP/CAD CURRENCY #> 45 GBP_CHF GBP/CHF CURRENCY #> 46 GBP_HKD GBP/HKD CURRENCY #> 47 GBP_JPY GBP/JPY CURRENCY #> 48 GBP_NZD GBP/NZD CURRENCY #> 49 GBP_PLN GBP/PLN CURRENCY #> 50 GBP_SGD GBP/SGD CURRENCY #> 51 GBP_USD GBP/USD CURRENCY #> 52 GBP_ZAR GBP/ZAR CURRENCY #> 53 HK33_HKD Hong Kong 33 CFD #> 54 HKD_JPY HKD/JPY CURRENCY #> 55 JP225_USD Japan 225 CFD #> 56 JP225Y_JPY Japan 225 (JPY) CFD #> 57 NAS100_USD US Nas 100 CFD #> 58 NATGAS_USD Natural Gas CFD #> 59 NL25_EUR Netherlands 25 CFD #> 60 NZD_CAD NZD/CAD CURRENCY #> 61 NZD_CHF NZD/CHF CURRENCY #> 62 NZD_HKD NZD/HKD CURRENCY #> 63 NZD_JPY NZD/JPY CURRENCY #> 64 NZD_SGD NZD/SGD CURRENCY #> 65 NZD_USD NZD/USD CURRENCY #> 66 SG30_SGD Singapore 30 CFD #> 67 SGD_CHF SGD/CHF CURRENCY #> 68 SGD_JPY SGD/JPY CURRENCY #> 69 SOYBN_USD Soybeans CFD #> 70 SPX500_USD US SPX 500 CFD #> 71 SUGAR_USD Sugar CFD #> 72 TRY_JPY TRY/JPY CURRENCY #> 73 UK100_GBP UK 100 CFD #> 74 UK10YB_GBP UK 10Y Gilt CFD #> 75 US2000_USD US Russ 2000 CFD #> 76 US30_USD US Wall St 30 CFD #> 77 USB02Y_USD US 2Y T-Note CFD #> 78 USB05Y_USD US 5Y T-Note CFD #> 79 USB10Y_USD US 10Y T-Note CFD #> 80 USB30Y_USD US T-Bond CFD #> 81 USD_CAD USD/CAD CURRENCY #> 82 USD_CHF USD/CHF CURRENCY #> 83 USD_CNH USD/CNH CURRENCY #> 84 USD_CZK USD/CZK CURRENCY #> 85 USD_DKK USD/DKK CURRENCY #> 86 USD_HKD USD/HKD CURRENCY #> 87 USD_HUF USD/HUF CURRENCY #> 88 USD_JPY USD/JPY CURRENCY #> 89 USD_MXN USD/MXN CURRENCY #> 90 USD_NOK USD/NOK CURRENCY #> 91 USD_PLN USD/PLN CURRENCY #> 92 USD_SEK USD/SEK CURRENCY #> 93 USD_SGD USD/SGD CURRENCY #> 94 USD_THB USD/THB CURRENCY #> 95 USD_TRY USD/TRY CURRENCY #> 96 USD_ZAR USD/ZAR CURRENCY #> 97 WHEAT_USD Wheat CFD #> 98 WTICO_USD West Texas Oil CFD #> 99 XAG_AUD Silver/AUD METAL #> 100 XAG_CAD Silver/CAD METAL #> 101 XAG_CHF Silver/CHF METAL #> 102 XAG_EUR Silver/EUR METAL #> 103 XAG_GBP Silver/GBP METAL #> 104 XAG_HKD Silver/HKD METAL #> 105 XAG_JPY Silver/JPY METAL #> 106 XAG_NZD Silver/NZD METAL #> 107 XAG_SGD Silver/SGD METAL #> 108 XAG_USD Silver METAL #> 109 XAU_AUD Gold/AUD METAL #> 110 XAU_CAD Gold/CAD METAL #> 111 XAU_CHF Gold/CHF METAL #> 112 XAU_EUR Gold/EUR METAL #> 113 XAU_GBP Gold/GBP METAL #> 114 XAU_HKD Gold/HKD METAL #> 115 XAU_JPY Gold/JPY METAL #> 116 XAU_NZD Gold/NZD METAL #> 117 XAU_SGD Gold/SGD METAL #> 118 XAU_USD Gold METAL #> 119 XAU_XAG Gold/Silver METAL #> 120 XCU_USD Copper CFD #> 121 XPD_USD Palladium CFD #> 122 XPT_USD Platinum CFD #> 123 ZAR_JPY ZAR/JPY CURRENCY"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"caching-implementation","dir":"Articles","previous_headings":"","what":"Caching Implementation","title":"ichimoku: The OANDA fxTrade API","text":"package retrieves following session (first time used) caches variables use: OANDA fxTrade API key OANDA fxTrade account associated fxTrade API key OANDA list available instruments reason become invalid outdated, please re-load package (restart R session) enable variables refreshed. Calling oanda_switch() also clear cached variables.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"ichimoku: The OANDA fxTrade API","text":"‘OANDA’ ‘fxTrade’ trademarks owned OANDA Corporation, entity unaffiliated ichimoku package, authors copyright holders. OANDA fxTrade API developer website: https://developer.oanda.com/.","code":""},{"path":"https://shikokuchuo.net/ichimoku/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Charlie Gao. Author, maintainer. Hibiki AI Limited. Copyright holder.","code":""},{"path":"https://shikokuchuo.net/ichimoku/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Gao C (2024). ichimoku: Visualization Tools Ichimoku Kinko Hyo Strategies. R package version 1.5.4.9000, https://doi.org/10.5281/zenodo.7879346.","code":"@Manual{, title = {ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies}, author = {Charlie Gao}, year = {2024}, note = {R package version 1.5.4.9000}, url = {https://doi.org/10.5281/zenodo.7879346}, }"},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"ichimoku-","dir":"","previous_headings":"","what":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"Visualization Tools Ichimoku Kinko Hyo Strategies implementation ‘Ichimoku Kinko Hyo’, also commonly known ‘cloud charts’. Static interactive visualizations tools creating, backtesting development quantitative ‘ichimoku’ strategies. described Sasaki (1996, ISBN:4925152009), technique refinement candlestick charting, originating Japan now widespread use technical analysis worldwide. Translating ‘one-glance equilibrium chart’, allows price action market structure financial securities determined ‘--glance’. Incorporates interface OANDA fxTrade API https://developer.oanda.com/ retrieving historical live streaming price data major currencies, metals, commodities, government bonds stock indices.","code":""},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"quick-start","dir":"","previous_headings":"","what":"Quick Start","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"Simply ichimoku() plot(): autostrat() automatically evaluate rank top-performing strategies:","code":"library(ichimoku) cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") plot(cloud, window = \"2020-05/\") autostrat(cloud, n = 3) #> [,1] [,2] [,3] #> Strategy \"senkouB > tenkan\" \"cloudB > tenkan\" \"senkouB > kijun\" #> --------------------- \"----------\" \"----------\" \"----------\" #> Strategy cuml return % 17.49 16.08 14.1 #> Per period mean ret % 0.0906 0.0838 0.0741 #> Periods in market 63 51 64 #> Total trades 3 3 3 #> Average trade length 21 17 21.33 #> Trade success % 100 100 100 #> Worst trade ret % 3.64 3.16 3.49 #> --------------------- \"----------\" \"----------\" \"----------\" #> Benchmark cuml ret % 5.53 5.53 5.53 #> Per period mean ret % 0.0302 0.0302 0.0302 #> Periods in market 178 178 178 #> --------------------- \"----------\" \"----------\" \"----------\" #> Direction \"long\" \"long\" \"long\" #> Start 2020-04-20 2020-04-20 2020-04-20 #> End 2020-12-23 2020-12-23 2020-12-23 #> Ticker \"TKR\" \"TKR\" \"TKR\""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"data--visualization","dir":"","previous_headings":"Principal ichimoku functions","what":"Data & Visualization","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"ichimoku() - create ichimoku object price data. plot() / iplot() - plot (interactive) cloud charts ichimoku objects. archive() - reading/writing objects /archive files data verification. oanda() - retrieve price data OANDA fxTrade API.","code":""},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"strategies--ml","dir":"","previous_headings":"Principal ichimoku functions","what":"Strategies & ML","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"strat() - augment ichimoku object strategy, including combined asymmetric strategies. autostrat() - automatically evaluate rank top-performing strategies. mlgrid() - generate numeric representation ichimoku cloud chart. relative() - produce statistical summary latest ichimoku numeric representation relative historical values.","code":""},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"real-time","dir":"","previous_headings":"Principal ichimoku functions","what":"Real-time","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"oanda_chart() - plot real-time ichimoku cloud charts using OANDA data. oanda_studio() - complete live analysis environment using OANDA data implemented R Shiny. oanda_stream() / oanda_quote() - obtain latest live data stream / quote OANDA fxTrade API. oanda_view() - market overview showing relative performance constituents. oanda_orders() / oanda_positions() - retrieve aggregate OANDA fxTrade order / position book.","code":""},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"vignettes","dir":"","previous_headings":"","what":"Vignettes","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"Long-form documentation links: { 1 } Cloud Charts - Reference Manual { 2 } Beyond Visualization - Quantitative Strategies { 3 } Auxiliary Functions { 4 } OANDA fxTrade API","code":""},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"Install latest release CRAN R-multiverse: current development version available R-universe:","code":"install.packages(\"ichimoku\") install.packages(\"ichimoku\", repos = \"https://shikokuchuo.r-universe.dev\")"},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"references","dir":"","previous_headings":"","what":"References","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"Sasaki, H. 佐々木 英信 (1996), 一目均衡表の研究 [ichimoku kinkouhyou kenkyuu]. Tokyo, Japan: Toushi Radar. ‘OANDA’ ‘fxTrade’ trademarks owned OANDA Corporation, entity unaffiliated ichimoku package. – ◈ ichimoku R package: https://shikokuchuo.net/ichimoku/. Listed CRAN Finance Task View: https://cran.r-project.org/view=Finance. – Please note project released Contributor Code Conduct. participating project agree abide terms.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":null,"dir":"Reference","previous_headings":"","what":"Read/write Objects <> Archive Files with Data Verification — archive","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"Read write objects /archival storage native RData format, verification data integrity.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"","code":"archive(..., object, file)"},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"... unnamed arguments parsed 'file' one argument, 'object' 'file' two arguments. object (write operations) object. file name file connection object saved read .","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"read operations: object originally archived. write operations: filename supplied. 'object' written 'file'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"read operations: specify 'file', alternatively arguments specified, system dialog opened allowing file chosen interactively. 'file' read return value may assigned object. confirmation message issued file read operation successful. write operations: specify 'object' 'file'. 'object' specified 'file' left empty (see examples), system dialog opened allowing file save location chosen interactively. 'object' written 'file'. confirmation message issued file write operation successful.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"data-verification","dir":"Reference","previous_headings":"","what":"Data Verification","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"SHA256 hash original object written archive. allows data integrity restored object verified archive read back. write operations: confirmation SHA256 hash written file displayed. read operations: 'data verified' message issued SHA256 hash found within data file authenticated.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"Please refer reference vignette calling: vignette(\"reference\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") file <- tempfile() archive(cloud, file) #> Archive written to '/tmp/RtmpuIqvJ3/file16f534b6d515' #> SHA256: f04ccb6b8869372733acb7ad07d468624e58b1b8ee9d6a715ab13e698fd1373b restored <- archive(file) #> Archive read from '/tmp/RtmpuIqvJ3/file16f534b6d515' #> Data verified by SHA256: f04ccb6b8869372733acb7ad07d468624e58b1b8ee9d6a715ab13e698fd1373b unlink(file) if (interactive()) { # Only run examples in interactive R sessions # Read file to 'object' using system dialog: object <- archive() # Write 'cloud' to file using system dialog: archive(cloud, ) }"},{"path":"https://shikokuchuo.net/ichimoku/reference/as.data.frame.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert ichimoku to data.frame — as.data.frame.ichimoku","title":"Convert ichimoku to data.frame — as.data.frame.ichimoku","text":"optimised 'ichimoku' 'data.frame' constructor.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/as.data.frame.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert ichimoku to data.frame — as.data.frame.ichimoku","text":"","code":"# S3 method for class 'ichimoku' as.data.frame(x, row.names, optional, keep.attrs = FALSE, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/as.data.frame.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert ichimoku to data.frame — as.data.frame.ichimoku","text":"x object class 'ichimoku'. row.names used. optional used. keep.attrs [default FALSE] set TRUE, preserve custom attributes set original object. ... arguments passed methods.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/as.data.frame.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert ichimoku to data.frame — as.data.frame.ichimoku","text":"'data.frame' object. ichimoku object index preserved first column header 'index'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/as.data.frame.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert ichimoku to data.frame — as.data.frame.ichimoku","text":"function S3 method generic function .data.frame() class 'ichimoku'. can invoked calling .data.frame(x) object 'x' class 'ichimoku'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/as.data.frame.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert ichimoku to data.frame — as.data.frame.ichimoku","text":"","code":"cloud <- ichimoku(sample_ohlc_data) df <- as.data.frame(cloud) str(df) #> 'data.frame':\t281 obs. of 13 variables: #> $ index : POSIXct, format: \"2020-01-02 00:00:00\" \"2020-01-03 00:00:00\" ... #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... df2 <- as.data.frame(cloud, keep.attrs = TRUE) str(df2) #> 'data.frame':\t281 obs. of 13 variables: #> $ index : POSIXct, format: \"2020-01-02 00:00:00\" \"2020-01-03 00:00:00\" ... #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... #> - attr(*, \"index\")= num [1:281] 1.58e+09 1.58e+09 1.58e+09 1.58e+09 1.58e+09 ... #> ..- attr(*, \"tzone\")= chr \"\" #> ..- attr(*, \"tclass\")= chr [1:2] \"POSIXct\" \"POSIXt\" #> - attr(*, \"periods\")= int [1:3] 9 26 52 #> - attr(*, \"periodicity\")= num 86400 #> - attr(*, \"ticker\")= chr \"sample_ohlc_data\""},{"path":"https://shikokuchuo.net/ichimoku/reference/autoplot.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Ichimoku Objects with ggplot2 — autoplot","title":"Plot Ichimoku Objects with ggplot2 — autoplot","text":"Plot Ichimoku Kinko Hyo cloud charts ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autoplot.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Ichimoku Objects with ggplot2 — autoplot","text":"","code":"# S3 method for class 'ichimoku' autoplot( object, window, ticker, subtitle, theme = c(\"classic\", \"dark\", \"mono\", \"noguchi\", \"okabe-ito\", \"solarized\"), strat = TRUE, type = c(\"none\", \"r\", \"s\", \"bar\", \"line\"), custom, ... )"},{"path":"https://shikokuchuo.net/ichimoku/reference/autoplot.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Ichimoku Objects with ggplot2 — autoplot","text":"object object class 'ichimoku'. window (optional) date-time window subset plot, ISO-8601 compatible range strings format used 'xts' objects, example \"2020-02-15/2020-08-15\" \"2020-02-15/\", \"/2020-08\" \"2020-07\". ticker (optional) specify ticker (text) include chart heading. set, ticker saved within ichimoku object used. subtitle (optional) specify subtitle display chart title. theme [default 'classic'] choices 'dark', 'mono', 'noguchi', 'okabe-ito' 'solarized'. Alternatively, supply vector 12 colour values (hex codes names) user-defined theme. strat [default TRUE] ichimoku object contains strategy, periods strategy results position shaded, strategy printed chart subtitle (otherwise specified). Set FALSE turn behaviour. type [default 'none'] type sub-plot display beneath ichimoku cloud chart, choice 'none', 'r' 's' corresponding oscillator type, 'bar' 'line' custom plots. custom (optional) character string (containing regular expression) matching column name variable displayed sub-plot. Specify type = 'bar' type = 'line', otherwise type settings take precedence. ... arguments used method.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autoplot.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Ichimoku Objects with ggplot2 — autoplot","text":"ggplot2 object S3 classes 'gg' 'ggplot'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autoplot.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot Ichimoku Objects with ggplot2 — autoplot","text":"function S3 method generic function autoplot() class 'ichimoku'. can invoked calling autoplot(x) object 'x' class 'ichimoku'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":null,"dir":"Reference","previous_headings":"","what":"Automated Ichimoku Strategies — autostrat","title":"Automated Ichimoku Strategies — autostrat","text":"Generate list top performing ichimoku cloud strategies based simple indicator conditions form 'c1 > c2' (level 1), complex combined strategies form 'c1 > c2 & c3 > c4' (level 2), complex asymmetric strategies form 'c1 > c2 x c3 > c4' (level 3).","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Automated Ichimoku Strategies — autostrat","text":"","code":"autostrat(x, n = 8, dir = c(\"long\", \"short\"), level = 1, quietly)"},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Automated Ichimoku Strategies — autostrat","text":"x ichimoku object. n [default 8] select top 'n' number strategies return. dir [default 'long'] trade direction, either 'long' 'short'. level [default 1] return simple strategies. complex strategies, set level 2 return combined strategies form 's1 & s2' level 3 return asymmetric strategies form 's1 x s2'. quietly (optional) set TRUE, suppress printing additional output console return quietly.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Automated Ichimoku Strategies — autostrat","text":"Returned invisibly, list 'n' ichimoku objects containing strategies, attributes 'logret' (vector cumulative log returns strategies) 'summary' (matrix summaries top 'n' strategies). addition, strategy summaries printed console.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Automated Ichimoku Strategies — autostrat","text":"Ichimoku objects strategy returned list. cumulative log returns strategies well summaries top 'n' strategies saved attributes list. information may retrieved using look returned list. individual ichimoku object may accessed via position list, e.g. [[1]] 1st item.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"Automated Ichimoku Strategies — autostrat","text":"Please refer strategies vignette calling: vignette(\"strategies\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Automated Ichimoku Strategies — autostrat","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") stratlist <- autostrat(cloud, n = 3, quietly = TRUE) look(stratlist) #> $logret #> senkouB_tenkan cloudB_tenkan senkouB_kijun cloudB_kijun low_tenkan #> 0.144869048 0.132721126 0.124552623 0.124476092 0.119988595 #> cloudB_close high_tenkan cloudB_low senkouB_close cloudT_kijun #> 0.117048881 0.112062056 0.110900734 0.110699399 0.103153955 #> senkouA_kijun senkouB_low cloudT_tenkan cloudT_high low_kijun #> 0.103077424 0.101480718 0.093961798 0.088759707 0.088503030 #> senkouB_high chikou_senkouA high_kijun senkouA_tenkan close_tenkan #> 0.086708526 0.084344426 0.083373239 0.081813876 0.079948752 #> tenkan_chikou senkouA_high cloudB_high senkouA_low senkouA_close #> 0.078961923 0.076693196 0.074642015 0.073761187 0.073712567 #> close_kijun chikou_cloudT cloudT_close kijun_chikou cloudT_low #> 0.071380845 0.069192621 0.067363085 0.066288776 0.064341171 #> chikou_cloudB chikou_close kijun_tenkan chikou_low chikou_senkouB #> 0.064291073 0.062225816 0.055091789 0.053536566 0.049139267 #> senkouA_senkouB senkouB_chikou chikou_high low_chikou high_chikou #> 0.048655509 0.045949698 0.042730532 0.041552399 0.034326207 #> close_chikou cloudB_chikou low_cloudT tenkan_kijun chikou_kijun #> 0.032863149 0.030797893 0.030747795 0.030128362 0.028800189 #> cloudT_chikou close_cloudT kijun_close senkouB_senkouA tenkan_close #> 0.025896344 0.024713830 0.023708120 0.023618778 0.023402736 #> close_senkouA low_senkouA high_cloudB high_senkouA tenkan_senkouA #> 0.021376398 0.021327779 0.020446951 0.018395770 0.013275089 #> senkouA_chikou chikou_tenkan high_senkouB kijun_low high_cloudT #> 0.010744539 0.010161327 0.008380439 0.006585935 0.006329258 #> tenkan_cloudT kijun_high low_senkouB tenkan_high kijun_senkouA #> 0.001127167 -0.003436078 -0.006391752 -0.007150571 -0.007988459 #> kijun_cloudT low_cloudB tenkan_low close_senkouB close_cloudB #> -0.008064990 -0.015811768 -0.015890560 -0.018622484 -0.021959916 #> tenkan_cloudB kijun_cloudB kijun_senkouB tenkan_senkouB #> -0.037632160 -0.040858512 -0.040935043 -0.049780083 #> #> $summary #> [,1] [,2] #> Strategy \"senkouB > tenkan\" \"cloudB > tenkan\" #> --------------------- \"----------\" \"----------\" #> Strategy cuml return % 17.49 16.08 #> Per period mean ret % 0.0906 0.0838 #> Periods in market 63 51 #> Total trades 3 3 #> Average trade length 21 17 #> Trade success % 100 100 #> Worst trade ret % 3.64 3.16 #> --------------------- \"----------\" \"----------\" #> Benchmark cuml ret % 5.53 5.53 #> Per period mean ret % 0.0302 0.0302 #> Periods in market 178 178 #> --------------------- \"----------\" \"----------\" #> Direction \"long\" \"long\" #> Start 2020-04-19 23:00:00 2020-04-19 23:00:00 #> End 2020-12-23 2020-12-23 #> Ticker \"TKR\" \"TKR\" #> [,3] #> Strategy \"senkouB > kijun\" #> --------------------- \"----------\" #> Strategy cuml return % 14.1 #> Per period mean ret % 0.0741 #> Periods in market 64 #> Total trades 3 #> Average trade length 21.33 #> Trade success % 100 #> Worst trade ret % 3.49 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> strat <- stratlist[[2]] summary(strat) #> [,1] #> Strategy \"cloudB > tenkan\" #> --------------------- \"----------\" #> Strategy cuml return % 16.08 #> Per period mean ret % 0.0838 #> Periods in market 51 #> Total trades 3 #> Average trade length 17 #> Trade success % 100 #> Worst trade ret % 3.16 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" autostrat(cloud, n = 1, dir = \"short\", level = 2) #> [,1] #> Strategy \"close > chikou & tenkan > senkouB\" #> --------------------- \"----------\" #> Strategy cuml return % 11.21 #> Per period mean ret % 0.0597 #> Periods in market 20 #> Total trades 4 #> Average trade length 5 #> Trade success % 75 #> Worst trade ret % -0.44 #> --------------------- \"----------\" #> Benchmark cuml ret % -5.24 #> Per period mean ret % -0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"short\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" autostrat(cloud, n = 1, dir = \"long\", level = 3) #> [,1] #> Strategy \"senkouB > senkouA x kijun > low\" #> --------------------- \"----------\" #> Strategy cuml return % 2.49 #> Per period mean ret % 0.0138 #> Periods in market 59 #> Total trades 3 #> Average trade length 19.67 #> Trade success % 66.67 #> Worst trade ret % -2.49 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\""},{"path":"https://shikokuchuo.net/ichimoku/reference/coredata.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract the Core Data of Ichimoku Objects — coredata","title":"Extract the Core Data of Ichimoku Objects — coredata","text":"Method extracting core data matrix ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/coredata.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract the Core Data of Ichimoku Objects — coredata","text":"","code":"# S3 method for class 'ichimoku' coredata(x, fmt, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/coredata.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract the Core Data of Ichimoku Objects — coredata","text":"x object class 'ichimoku'. fmt (optional) set TRUE retain index row names returned matrix, character string passed 'format' argument format.POSIXct() format values specific way. ... arguments passed methods.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/coredata.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract the Core Data of Ichimoku Objects — coredata","text":"numeric matrix containing ichimoku object data, stripped index unless 'fmt' specified case index retained character values matrix row names.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/coredata.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract the Core Data of Ichimoku Objects — coredata","text":"function S3 method generic function coredata() class 'ichimoku'. can invoked calling coredata(x) object 'x' class 'ichimoku'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/coredata.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract the Core Data of Ichimoku Objects — coredata","text":"","code":"cloud <- ichimoku(sample_ohlc_data) coredata(cloud)[101:120, ] #> open high low close cd tenkan kijun senkouA senkouB chikou cloudT #> [1,] 122.4 122.6 121.1 121.9 -1 121.05 123.90 125.675 124.85 135.6 125.675 #> [2,] 121.9 123.7 121.7 123.3 1 121.40 123.80 125.675 124.85 134.5 125.675 #> [3,] 123.3 124.0 123.0 124.0 1 121.55 123.80 125.675 124.85 134.3 125.675 #> [4,] 124.2 124.3 124.0 124.1 -1 121.75 123.65 125.975 124.85 135.9 125.975 #> [5,] 124.1 124.1 123.4 123.9 -1 122.25 123.65 126.475 124.85 135.2 126.475 #> [6,] 123.9 124.7 123.7 124.5 1 122.90 123.65 126.575 124.85 135.7 126.575 #> [7,] 124.5 124.7 123.9 124.2 -1 122.90 123.60 126.250 124.85 135.4 126.250 #> [8,] 124.2 125.2 124.0 124.7 1 123.15 123.60 126.150 124.85 135.7 126.150 #> [9,] 124.7 129.8 124.7 129.6 1 125.45 124.45 125.675 124.85 135.6 125.675 #> [10,] 129.9 130.6 129.9 130.2 1 126.15 124.85 125.625 124.85 136.2 125.625 #> [11,] 130.2 132.5 129.7 131.6 1 127.75 125.80 125.625 124.85 136.5 125.625 #> [12,] 131.6 132.0 131.1 131.7 1 127.95 125.80 125.550 124.85 138.1 125.550 #> [13,] 131.7 133.4 131.6 133.0 1 128.40 126.25 125.425 124.85 137.8 125.425 #> [14,] 133.0 134.3 131.9 132.5 -1 129.00 126.70 125.550 124.85 139.3 125.550 #> [15,] 132.4 132.8 131.2 131.9 -1 129.10 126.70 125.650 124.85 139.3 125.650 #> [16,] 131.9 132.0 131.6 131.9 0 129.15 126.70 125.875 124.85 138.8 125.875 #> [17,] 131.9 132.3 131.1 132.0 1 129.50 126.70 125.400 124.85 137.2 125.400 #> [18,] 132.0 134.7 131.8 134.3 1 132.20 126.90 124.825 124.85 135.2 124.850 #> [19,] 134.3 134.4 132.0 132.3 -1 132.20 126.90 123.800 124.85 137.0 124.850 #> [20,] 132.3 132.8 131.5 131.8 -1 132.90 126.90 123.375 124.55 136.6 124.550 #> cloudB #> [1,] 124.850 #> [2,] 124.850 #> [3,] 124.850 #> [4,] 124.850 #> [5,] 124.850 #> [6,] 124.850 #> [7,] 124.850 #> [8,] 124.850 #> [9,] 124.850 #> [10,] 124.850 #> [11,] 124.850 #> [12,] 124.850 #> [13,] 124.850 #> [14,] 124.850 #> [15,] 124.850 #> [16,] 124.850 #> [17,] 124.850 #> [18,] 124.825 #> [19,] 123.800 #> [20,] 123.375"},{"path":"https://shikokuchuo.net/ichimoku/reference/df_append.html","id":null,"dir":"Reference","previous_headings":"","what":"Append New Data to Dataframe — df_append","title":"Append New Data to Dataframe — df_append","text":"Update 'data.frame' object new data. Can used append new updated time series data existing dataframe, observation indexed unique timestamp/identifier key column.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_append.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Append New Data to Dataframe — df_append","text":"","code":"df_append(old, new, key = \"time\", keep.attr = \"timestamp\")"},{"path":"https://shikokuchuo.net/ichimoku/reference/df_append.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Append New Data to Dataframe — df_append","text":"old data.frame object containing existing data. new data.frame object containing new data. key [default 'time'] column name used key, provided character string. keep.attr [default 'timestamp'] name attribute 'new' retain, present, provided character string.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_append.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Append New Data to Dataframe — df_append","text":"data.frame existing data appended new data. data 'new' contains data value key column 'old', data 'new' overwrite data 'old'. attribute specified 'keep.attr' present 'new', retained. non-required attributes dropped.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_append.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Append New Data to Dataframe — df_append","text":"Can used update price dataframes retrieved oanda. function designed update existing data new values become available. opposed df_merge, data 'new' overwrite data 'old' rather create duplicates.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_append.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Append New Data to Dataframe — df_append","text":"","code":"data1 <- sample_ohlc_data[1:8, ] data1 #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 data2 <- sample_ohlc_data[7:10, ] data2 #> time open high low close volume #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879 df_append(data1, data2) #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879"},{"path":"https://shikokuchuo.net/ichimoku/reference/df_merge.html","id":null,"dir":"Reference","previous_headings":"","what":"Merge Dataframes — df_merge","title":"Merge Dataframes — df_merge","text":"Full join arbitrary number 'data.frame' objects passed arguments, preserving unique entries. Can used combine historical time series data observation indexed unique timestamp periods complete.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_merge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merge Dataframes — df_merge","text":"","code":"df_merge(...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/df_merge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merge Dataframes — df_merge","text":"... data.frame objects combine.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_merge.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Merge Dataframes — df_merge","text":"data.frame containing unique entries objects passed argument.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_merge.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Merge Dataframes — df_merge","text":"Can used join price dataframes retrieved oanda. function designed join complete historical data. data merged contains data incomplete periods, entries preserved rather updated. incomplete periods detected within data, warning issued, resulting dataframe manually checked case contains unwanted duplicates. Use df_append updating dataframes new values.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_merge.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Merge Dataframes — df_merge","text":"","code":"data1 <- sample_ohlc_data[1:6, ] data1 #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 data2 <- sample_ohlc_data[4:10, ] data2 #> time open high low close volume #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879 df_merge(data1, data2) #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879"},{"path":"https://shikokuchuo.net/ichimoku/reference/dot-ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"ichimoku Technical Utility Version — .ichimoku","title":"ichimoku Technical Utility Version — .ichimoku","text":"Create ichimoku object containing values components Ichimoku Kinko Hyo cloud chart. object encapsulates date-time index, OHLC pricing data, candle direction, cloud lines Tenkan-sen, Kijun-sen, Senkou span , Senkou span B Chikou span, well values cloud top cloud base.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/dot-ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ichimoku Technical Utility Version — .ichimoku","text":"","code":".ichimoku(x, ticker, periods = c(9L, 26L, 52L), ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/dot-ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ichimoku Technical Utility Version — .ichimoku","text":"x data.frame object POSIXct date-time index first column numeric OHLC pricing data second fifth columns. ticker (optional) specify ticker identify instrument, otherwise set name input object. periods [default c(9L, 26L, 52L)] vector defining length periods used cloud. parameter shoud normally modified using values invalid context traditional ichimoku analysis. ... additional arguments, instance 'holidays', passed along tradingDays calculating future cloud daily data.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/dot-ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ichimoku Technical Utility Version — .ichimoku","text":"ichimoku object S3 classes 'ichimoku', 'xts' 'zoo'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/dot-ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ichimoku Technical Utility Version — .ichimoku","text":"faster version ichimoku can used data dataframe prescribed format. support argument 'keep.data'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/grid_dup.html","id":null,"dir":"Reference","previous_headings":"","what":"Duplicates of expand.grid for 2 Variables — grid_dup","title":"Duplicates of expand.grid for 2 Variables — grid_dup","text":"Create vector element positions duplicates output expand.grid 2 identical vectors. efficient method creating combinations 2 variables.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/grid_dup.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Duplicates of expand.grid for 2 Variables — grid_dup","text":"","code":"grid_dup(n, omit.id)"},{"path":"https://shikokuchuo.net/ichimoku/reference/grid_dup.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Duplicates of expand.grid for 2 Variables — grid_dup","text":"n length vector passed expand.grid(). omit.id (optional) set TRUE also select elements 2 items identical. output expand.grid, subset remove duplicates 'omit.id' set TRUE equivalent utils::combn(n, 2).","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/grid_dup.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Duplicates of expand.grid for 2 Variables — grid_dup","text":"numeric vector.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/grid_dup.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Duplicates of expand.grid for 2 Variables — grid_dup","text":"","code":"n <- 3 expand.grid(1:n, 1:n) #> Var1 Var2 #> 1 1 1 #> 2 2 1 #> 3 3 1 #> 4 1 2 #> 5 2 2 #> 6 3 2 #> 7 1 3 #> 8 2 3 #> 9 3 3 expand.grid(1:n, 1:n)[-grid_dup(n), ] #> Var1 Var2 #> 1 1 1 #> 2 2 1 #> 3 3 1 #> 5 2 2 #> 6 3 2 #> 9 3 3 expand.grid(1:n, 1:n)[-grid_dup(n, omit.id = TRUE), ] #> Var1 Var2 #> 2 2 1 #> 3 3 1 #> 6 3 2"},{"path":"https://shikokuchuo.net/ichimoku/reference/hasStrat.html","id":null,"dir":"Reference","previous_headings":"","what":"hasStrat — hasStrat","title":"hasStrat — hasStrat","text":"function checking object contains strategy.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/hasStrat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"hasStrat — hasStrat","text":"","code":"hasStrat(x)"},{"path":"https://shikokuchuo.net/ichimoku/reference/hasStrat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"hasStrat — hasStrat","text":"x object.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/hasStrat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"hasStrat — hasStrat","text":"logical value TRUE 'strat' attribute 'x' set, otherwise FALSE.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/hasStrat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"hasStrat — hasStrat","text":"Designed used ichimoku functions either S3 methods class 'ichimoku' validation 'x' ichimoku object, hence check class 'x' within function.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/hasStrat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"hasStrat — hasStrat","text":"","code":"cloud <- ichimoku(sample_ohlc_data) strat <- strat(cloud) # TRUE: hasStrat(strat) #> [1] TRUE # FALSE: hasStrat(cloud) #> [1] FALSE"},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku-package.html","id":null,"dir":"Reference","previous_headings":"","what":"ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies — ichimoku-package","title":"ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies — ichimoku-package","text":"implementation 'Ichimoku Kinko Hyo', also commonly known 'cloud charts'. Static interactive visualizations tools creating, backtesting development quantitative 'ichimoku' strategies. described Sasaki (1996, ISBN:4925152009), technique refinement candlestick charting, originating Japan now widespread use technical analysis worldwide. Translating 'one-glance equilibrium chart', allows price action market structure financial securities determined '--glance'. Incorporates interface OANDA fxTrade API https://developer.oanda.com/ retrieving historical live streaming price data major currencies, metals, commodities, government bonds stock indices.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku-package.html","id":"principal-ichimoku-functions","dir":"Reference","previous_headings":"","what":"Principal ichimoku functions","title":"ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies — ichimoku-package","text":"Data & Visualization ichimoku create ichimoku object price data. plot.ichimoku / iplot plot (interactive) cloud charts ichimoku objects. archive reading/writing objects /archive files data verification. oanda retrieve price data OANDA fxTrade API. Strategies & ML strat augment ichimoku object strategy, including combined asymmetric strategies. autostrat automatically evaluate rank top-performing strategies. mlgrid generate numeric representation ichimoku cloud chart. relative produce statistical summary latest ichimoku numeric representation relative historical values. Real-time oanda_chart plot real-time ichimoku cloud charts using OANDA data. oanda_studio complete live analysis environment using OANDA data implemented R Shiny. oanda_stream / oanda_quote obtain latest live data stream / quote OANDA fxTrade API. oanda_view market overview showing relative performance constituents. oanda_orders / oanda_positions retrieve aggregate OANDA fxTrade order / position book.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies — ichimoku-package","text":"Sasaki, H. (1996), ichimoku kinkouhyou kenkyuu. Tokyo, Japan: Toushi Radar. OANDA' 'fxTrade' trademarks owned OANDA Corporation, entity unaffiliated ichimoku package, authors copyright holders.","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies — ichimoku-package","text":"Charlie Gao charlie.gao@shikokuchuo.net (ORCID)","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"ichimoku — ichimoku","title":"ichimoku — ichimoku","text":"Create ichimoku object containing values components Ichimoku Kinko Hyo cloud chart. object encapsulates date-time index, OHLC pricing data, candle direction, cloud lines Tenkan-sen, Kijun-sen, Senkou span , Senkou span B Chikou span, well values cloud top cloud base.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ichimoku — ichimoku","text":"","code":"ichimoku(x, ticker, periods = c(9L, 26L, 52L), keep.data = FALSE, ...) # S3 method for class 'ichimoku' ichimoku(x, ticker, periods = c(9L, 26L, 52L), keep.data = FALSE, ...) # S3 method for class 'xts' ichimoku(x, ticker, periods = c(9L, 26L, 52L), keep.data = FALSE, ...) # S3 method for class 'data.frame' ichimoku(x, ticker, periods = c(9L, 26L, 52L), keep.data = FALSE, ...) # S3 method for class 'matrix' ichimoku(x, ticker, periods = c(9L, 26L, 52L), keep.data = FALSE, ...) # Default S3 method ichimoku(x, ticker, periods = c(9L, 26L, 52L), keep.data = FALSE, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ichimoku — ichimoku","text":"x data.frame compatible object, includes xts, data.table, tibble, matrix. ticker (optional) specify ticker identify instrument, otherwise set name input object. periods [default c(9L, 26L, 52L)] vector defining length periods used cloud. parameter shoud normally modified using values invalid context traditional ichimoku analysis. keep.data [default FALSE] set TRUE retain additional data present input object additional columns /attributes. ... additional arguments, instance 'holidays', passed along tradingDays calculating future cloud daily data.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ichimoku — ichimoku","text":"ichimoku object S3 classes 'ichimoku', 'xts' 'zoo'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ichimoku — ichimoku","text":"Calling ichimoku object automatically invokes print method, default produces printout data console well plot cloud chart graphical device. options, use plot() returned ichimoku object pass arguments customising chart. Use iplot() interactive charting. ichimoku object passed ichimoku(), ichimoku object re-calculated using OHLC pricing data contained within.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"ichimoku-object-specification","dir":"Reference","previous_headings":"","what":"Ichimoku Object Specification","title":"ichimoku — ichimoku","text":"Index: index(object): date-time index [POSIXct] Columns [numeric]: object$open: opening price $high: high price $low: low price $close: closing price $cd: candle direction (-1 = , 0 = flat, 1 = ) $tenkan: Tenkan-sen $kijun: Kijun-sen $senkouA: Senkou span $senkouB: Senkou span B $chikou: Chikou span $cloudT: cloud Top (max senkouA, senkouB) $cloudB: cloud Base (min senkouA, senkouB) Attributes: attributes(object)$periods: parameters used calculate cloud [integer vector length 3] $periodicity: periodicity data seconds [numeric] $ticker: instrument identifier [character]","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"ichimoku — ichimoku","text":"ichimoku() requires OHLC (else HLC) price data input calculate cloud chart values. single series price data supplied, pseudo OHLC series generated pseudo cloud chart returned. faster technical utility version function available .ichimoku use data already required format. Please refer reference vignette calling: vignette(\"reference\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ichimoku — ichimoku","text":"","code":"TKR <- sample_ohlc_data cloud <- ichimoku(TKR) cloud #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB chikou #> 2020-01-02 123.0 123.1 122.5 122.7 -1 NA NA NA NA 122.8 #> 2020-01-03 122.7 122.8 122.6 122.8 1 NA NA NA NA 122.9 #> 2020-01-06 122.8 123.4 122.4 123.3 1 NA NA NA NA 123.0 #> 2020-01-07 123.3 124.3 123.3 124.1 1 NA NA NA NA 123.9 #> 2020-01-08 124.1 124.8 124.0 124.8 1 NA NA NA NA 123.6 #> 2020-01-09 124.8 125.4 124.5 125.3 1 NA NA NA NA 122.5 #> 2020-01-10 125.3 125.3 124.8 125.2 -1 NA NA NA NA 122.6 #> 2020-01-13 125.2 125.3 125.1 125.2 0 NA NA NA NA 123.0 #> 2020-01-14 125.2 125.2 124.3 124.4 -1 123.90 NA NA NA 123.1 #> 2020-01-15 124.4 124.5 123.7 123.9 -1 123.90 NA NA NA 122.1 #> 2020-01-16 123.9 124.4 123.8 124.2 1 123.90 NA NA NA 121.9 #> 2020-01-17 124.2 124.3 123.0 123.5 -1 124.20 NA NA NA 121.1 #> 2020-01-20 123.5 123.8 123.1 123.2 -1 124.20 NA NA NA 121.4 #> 2020-01-21 123.6 123.6 123.4 123.6 0 124.20 NA NA NA 121.5 #> 2020-01-22 123.5 124.0 123.3 123.5 0 124.15 NA NA NA 121.9 #> 2020-01-23 123.5 124.5 123.3 124.3 1 124.15 NA NA NA 120.9 #> 2020-01-24 124.3 124.4 124.0 124.2 -1 124.10 NA NA NA 121.0 #> 2020-01-27 124.2 124.2 122.7 123.0 -1 123.60 NA NA NA 120.8 #> 2020-01-28 123.0 123.6 122.7 123.1 1 123.60 NA NA NA 121.2 #> 2020-01-29 123.1 123.3 123.1 123.2 1 123.60 NA NA NA 121.6 #> 2020-01-30 123.2 123.2 122.8 123.1 -1 123.60 NA NA NA 121.1 #> 2020-01-31 123.1 123.5 123.0 123.2 1 123.60 NA NA NA 122.1 #> 2020-02-03 123.2 123.3 122.6 123.0 -1 123.55 NA NA NA 122.2 #> 2020-02-04 123.0 123.1 122.6 122.9 -1 123.55 NA NA NA 122.2 #> 2020-02-05 122.9 123.2 122.6 122.8 -1 123.50 NA NA NA 122.4 #> 2020-02-06 122.8 122.9 122.8 122.8 0 123.40 123.90 NA NA 122.4 #> cloudT cloudB #> 2020-01-02 NA NA #> 2020-01-03 NA NA #> 2020-01-06 NA NA #> 2020-01-07 NA NA #> 2020-01-08 NA NA #> 2020-01-09 NA NA #> 2020-01-10 NA NA #> 2020-01-13 NA NA #> 2020-01-14 NA NA #> 2020-01-15 NA NA #> 2020-01-16 NA NA #> 2020-01-17 NA NA #> 2020-01-20 NA NA #> 2020-01-21 NA NA #> 2020-01-22 NA NA #> 2020-01-23 NA NA #> 2020-01-24 NA NA #> 2020-01-27 NA NA #> 2020-01-28 NA NA #> 2020-01-29 NA NA #> 2020-01-30 NA NA #> 2020-01-31 NA NA #> 2020-02-03 NA NA #> 2020-02-04 NA NA #> 2020-02-05 NA NA #> 2020-02-06 NA NA #> [ reached getOption(\"max.print\") -- omitted 27 rows ] kumo <- ichimoku(TKR, ticker = \"TKR Co.\", periods = c(9, 26, 52), keep.data = TRUE) summary(kumo) #> ichimoku object with dimensions (281, 13) #> #> Max: 2020-07-13 23:00:00 [139.7] #> Start: 2020-01-02 00:00:00 [123] End: 2020-12-24 00:00:00 [136] #> Min: 2020-05-12 23:00:00 [119.1] #> #> Cloud periods: 9 26 52 #> Periodicity: 1 days #> Ticker: TKR Co. print(kumo, plot = FALSE, rows = 10) #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB chikou #> 2020-01-02 123.0 123.1 122.5 122.7 -1 NA NA NA NA 122.8 #> 2020-01-03 122.7 122.8 122.6 122.8 1 NA NA NA NA 122.9 #> 2020-01-06 122.8 123.4 122.4 123.3 1 NA NA NA NA 123.0 #> 2020-01-07 123.3 124.3 123.3 124.1 1 NA NA NA NA 123.9 #> 2020-01-08 124.1 124.8 124.0 124.8 1 NA NA NA NA 123.6 #> 2020-01-09 124.8 125.4 124.5 125.3 1 NA NA NA NA 122.5 #> 2020-01-10 125.3 125.3 124.8 125.2 -1 NA NA NA NA 122.6 #> 2020-01-13 125.2 125.3 125.1 125.2 0 NA NA NA NA 123.0 #> 2020-01-14 125.2 125.2 124.3 124.4 -1 123.9 NA NA NA 123.1 #> 2020-01-15 124.4 124.5 123.7 123.9 -1 123.9 NA NA NA 122.1 #> cloudT cloudB volume #> 2020-01-02 NA NA 1875 #> 2020-01-03 NA NA 1479 #> 2020-01-06 NA NA 1792 #> 2020-01-07 NA NA 1977 #> 2020-01-08 NA NA 2239 #> 2020-01-09 NA NA 1842 #> 2020-01-10 NA NA 2548 #> 2020-01-13 NA NA 2946 #> 2020-01-14 NA NA 2796 #> 2020-01-15 NA NA 2879 #> [ reached getOption(\"max.print\") -- omitted 11 rows ] plot(kumo, theme = \"solarized\", type = \"bar\", custom = \"volume\")"},{"path":"https://shikokuchuo.net/ichimoku/reference/index.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract the Index of Ichimoku Objects — index","title":"Extract the Index of Ichimoku Objects — index","text":"Method extracting date-time index ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/index.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract the Index of Ichimoku Objects — index","text":"","code":"# S3 method for class 'ichimoku' index(x, subset, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/index.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract the Index of Ichimoku Objects — index","text":"x object class 'ichimoku'. subset integer logical value vector subset index. ... arguments passed methods.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/index.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract the Index of Ichimoku Objects — index","text":"date-time index ichimoku object vector POSIXct values.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/index.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract the Index of Ichimoku Objects — index","text":"function S3 method generic function index() class 'ichimoku'. can invoked calling index(x) object 'x' class 'ichimoku'. Subsetting specifying 'subset' parameter subsets using numerical values underlying POSIXct times results faster operation usual subset operators '['.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/index.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract the Index of Ichimoku Objects — index","text":"","code":"cloud <- ichimoku(sample_ohlc_data) index(cloud)[101:110] #> [1] \"2020-05-20 23:00:00 UTC\" \"2020-05-21 23:00:00 UTC\" #> [3] \"2020-05-24 23:00:00 UTC\" \"2020-05-25 23:00:00 UTC\" #> [5] \"2020-05-26 23:00:00 UTC\" \"2020-05-27 23:00:00 UTC\" #> [7] \"2020-05-28 23:00:00 UTC\" \"2020-05-31 23:00:00 UTC\" #> [9] \"2020-06-01 23:00:00 UTC\" \"2020-06-02 23:00:00 UTC\" index(cloud, 101:110) #> [1] \"2020-05-20 23:00:00 UTC\" \"2020-05-21 23:00:00 UTC\" #> [3] \"2020-05-24 23:00:00 UTC\" \"2020-05-25 23:00:00 UTC\" #> [5] \"2020-05-26 23:00:00 UTC\" \"2020-05-27 23:00:00 UTC\" #> [7] \"2020-05-28 23:00:00 UTC\" \"2020-05-31 23:00:00 UTC\" #> [9] \"2020-06-01 23:00:00 UTC\" \"2020-06-02 23:00:00 UTC\""},{"path":"https://shikokuchuo.net/ichimoku/reference/iplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive Ichimoku Cloud Plot — iplot","title":"Interactive Ichimoku Cloud Plot — iplot","text":"Plot Ichimoku Kinko Hyo cloud charts ichimoku objects R Shiny, allowing full customisation chart elements interactive environment. Intuitive cursor infotip provides ready access data directly chart.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/iplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive Ichimoku Cloud Plot — iplot","text":"","code":"iplot( x, ticker, subtitle, theme = c(\"classic\", \"dark\", \"mono\", \"noguchi\", \"okabe-ito\", \"solarized\"), strat = TRUE, type = c(\"none\", \"r\", \"s\", \"bar\", \"line\"), custom, ..., launch.browser = TRUE )"},{"path":"https://shikokuchuo.net/ichimoku/reference/iplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive Ichimoku Cloud Plot — iplot","text":"x object class 'ichimoku'. ticker (optional) specify ticker (text) include chart heading. set, ticker saved within ichimoku object used. subtitle (optional) specify subtitle display chart title. theme [default 'classic'] choices 'dark', 'mono', 'noguchi', 'okabe-ito' 'solarized'. strat [default TRUE] ichimoku object contains strategy, periods strategy results position shaded, strategy printed chart subtitle (otherwise specified). Set FALSE turn behaviour. type [default 'none'] type sub-plot display beneath ichimoku cloud chart, choice 'none', 'r' 's' corresponding oscillator type, 'bar' 'line' custom plots. custom (optional) character string (containing regular expression) matching column name variable displayed sub-plot. Specify type = 'bar' type = 'line', otherwise type settings take precedence. ... additional parameters passed along 'options' argument shiny::shinyApp(). launch.browser [default TRUE] TRUE, system's default web browser launched automatically app started. value argument can also function call application's URL. use default Shiny viewer RStudio, please specify getOption(\"shiny.launch.browser\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/iplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Interactive Ichimoku Cloud Plot — iplot","text":"Shiny app object class 'shiny.appobj'. default arguments, Shiny app launched default browser.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/iplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Interactive Ichimoku Cloud Plot — iplot","text":"details please refer reference vignette calling: vignette(\"reference\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/iplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Interactive Ichimoku Cloud Plot — iplot","text":"","code":"if (interactive()) { # Only run examples in interactive R sessions cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") iplot(cloud) # To open in RStudio viewer instead of default browser iplot(cloud, launch.browser = getOption(\"shiny.launch.browser\")) }"},{"path":"https://shikokuchuo.net/ichimoku/reference/is.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"is.ichimoku — is.ichimoku","title":"is.ichimoku — is.ichimoku","text":"function checking object ichimoku object.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/is.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"is.ichimoku — is.ichimoku","text":"","code":"is.ichimoku(x)"},{"path":"https://shikokuchuo.net/ichimoku/reference/is.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"is.ichimoku — is.ichimoku","text":"x object.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/is.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"is.ichimoku — is.ichimoku","text":"logical value TRUE 'x' class 'ichimoku', otherwise FALSE.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/is.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"is.ichimoku — is.ichimoku","text":"","code":"cloud <- ichimoku(sample_ohlc_data) # TRUE: is.ichimoku(cloud) #> [1] TRUE # FALSE: is.ichimoku(sample_ohlc_data) #> [1] FALSE"},{"path":"https://shikokuchuo.net/ichimoku/reference/look.html","id":null,"dir":"Reference","previous_headings":"","what":"Look at Informational Attributes — look","title":"Look at Informational Attributes — look","text":"Inspect informational attributes objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/look.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Look at Informational Attributes — look","text":"","code":"look(x = .Last.value)"},{"path":"https://shikokuchuo.net/ichimoku/reference/look.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Look at Informational Attributes — look","text":"x object (optional). 'x' supplied, .Last.value used instead.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/look.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Look at Informational Attributes — look","text":"objects created ichimoku package, list attributes specific data type. objects, list non-standard attributes matrix / data.frame / xts classes, else invisible NULL none present.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/look.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Look at Informational Attributes — look","text":"Note: autostrat list attributes may accessed directly using look(x)$logret look(x)$summary.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/look.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Look at Informational Attributes — look","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") look(cloud) #> $periods #> [1] 9 26 52 #> #> $periodicity #> [1] 86400 #> #> $ticker #> [1] \"TKR\" #> stratlist <- autostrat(cloud, n = 3) #> [,1] [,2] #> Strategy \"senkouB > tenkan\" \"cloudB > tenkan\" #> --------------------- \"----------\" \"----------\" #> Strategy cuml return % 17.49 16.08 #> Per period mean ret % 0.0906 0.0838 #> Periods in market 63 51 #> Total trades 3 3 #> Average trade length 21 17 #> Trade success % 100 100 #> Worst trade ret % 3.64 3.16 #> --------------------- \"----------\" \"----------\" #> Benchmark cuml ret % 5.53 5.53 #> Per period mean ret % 0.0302 0.0302 #> Periods in market 178 178 #> --------------------- \"----------\" \"----------\" #> Direction \"long\" \"long\" #> Start 2020-04-19 23:00:00 2020-04-19 23:00:00 #> End 2020-12-23 2020-12-23 #> Ticker \"TKR\" \"TKR\" #> [,3] #> Strategy \"senkouB > kijun\" #> --------------------- \"----------\" #> Strategy cuml return % 14.1 #> Per period mean ret % 0.0741 #> Periods in market 64 #> Total trades 3 #> Average trade length 21.33 #> Trade success % 100 #> Worst trade ret % 3.49 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" look(stratlist) #> $logret #> senkouB_tenkan cloudB_tenkan senkouB_kijun cloudB_kijun low_tenkan #> 0.144869048 0.132721126 0.124552623 0.124476092 0.119988595 #> cloudB_close high_tenkan cloudB_low senkouB_close cloudT_kijun #> 0.117048881 0.112062056 0.110900734 0.110699399 0.103153955 #> senkouA_kijun senkouB_low cloudT_tenkan cloudT_high low_kijun #> 0.103077424 0.101480718 0.093961798 0.088759707 0.088503030 #> senkouB_high chikou_senkouA high_kijun senkouA_tenkan close_tenkan #> 0.086708526 0.084344426 0.083373239 0.081813876 0.079948752 #> tenkan_chikou senkouA_high cloudB_high senkouA_low senkouA_close #> 0.078961923 0.076693196 0.074642015 0.073761187 0.073712567 #> close_kijun chikou_cloudT cloudT_close kijun_chikou cloudT_low #> 0.071380845 0.069192621 0.067363085 0.066288776 0.064341171 #> chikou_cloudB chikou_close kijun_tenkan chikou_low chikou_senkouB #> 0.064291073 0.062225816 0.055091789 0.053536566 0.049139267 #> senkouA_senkouB senkouB_chikou chikou_high low_chikou high_chikou #> 0.048655509 0.045949698 0.042730532 0.041552399 0.034326207 #> close_chikou cloudB_chikou low_cloudT tenkan_kijun chikou_kijun #> 0.032863149 0.030797893 0.030747795 0.030128362 0.028800189 #> cloudT_chikou close_cloudT kijun_close senkouB_senkouA tenkan_close #> 0.025896344 0.024713830 0.023708120 0.023618778 0.023402736 #> close_senkouA low_senkouA high_cloudB high_senkouA tenkan_senkouA #> 0.021376398 0.021327779 0.020446951 0.018395770 0.013275089 #> senkouA_chikou chikou_tenkan high_senkouB kijun_low high_cloudT #> 0.010744539 0.010161327 0.008380439 0.006585935 0.006329258 #> tenkan_cloudT kijun_high low_senkouB tenkan_high kijun_senkouA #> 0.001127167 -0.003436078 -0.006391752 -0.007150571 -0.007988459 #> kijun_cloudT low_cloudB tenkan_low close_senkouB close_cloudB #> -0.008064990 -0.015811768 -0.015890560 -0.018622484 -0.021959916 #> tenkan_cloudB kijun_cloudB kijun_senkouB tenkan_senkouB #> -0.037632160 -0.040858512 -0.040935043 -0.049780083 #> #> $summary #> [,1] [,2] #> Strategy \"senkouB > tenkan\" \"cloudB > tenkan\" #> --------------------- \"----------\" \"----------\" #> Strategy cuml return % 17.49 16.08 #> Per period mean ret % 0.0906 0.0838 #> Periods in market 63 51 #> Total trades 3 3 #> Average trade length 21 17 #> Trade success % 100 100 #> Worst trade ret % 3.64 3.16 #> --------------------- \"----------\" \"----------\" #> Benchmark cuml ret % 5.53 5.53 #> Per period mean ret % 0.0302 0.0302 #> Periods in market 178 178 #> --------------------- \"----------\" \"----------\" #> Direction \"long\" \"long\" #> Start 2020-04-19 23:00:00 2020-04-19 23:00:00 #> End 2020-12-23 2020-12-23 #> Ticker \"TKR\" \"TKR\" #> [,3] #> Strategy \"senkouB > kijun\" #> --------------------- \"----------\" #> Strategy cuml return % 14.1 #> Per period mean ret % 0.0741 #> Periods in market 64 #> Total trades 3 #> Average trade length 21.33 #> Trade success % 100 #> Worst trade ret % 3.49 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> strat <- stratlist[[1]] look(strat) #> $periods #> [1] 9 26 52 #> #> $periodicity #> [1] 86400 #> #> $ticker #> [1] \"TKR\" #> #> $strat #> [,1] #> Strategy \"senkouB > tenkan\" #> --------------------- \"----------\" #> Strategy cuml return % 17.49 #> Per period mean ret % 0.0906 #> Periods in market 63 #> Total trades 3 #> Average trade length 21 #> Trade success % 100 #> Worst trade ret % 3.64 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> grid <- mlgrid(cloud) look(grid) #> $y #> [1] \"logret\" #> #> $k #> [1] 1 #> #> $direction #> [1] \"long\" #> #> $type #> [1] \"boolean\" #> #> $ticker #> [1] \"TKR\" #> #> $means #> [1] NA #> #> $sdevs #> [1] NA #> if (FALSE) { # \\dontrun{ # OANDA API key required to run this example prices <- oanda(\"USD_JPY\") look(prices) } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/matrix_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert matrix to data.frame — matrix_df","title":"Convert matrix to data.frame — matrix_df","text":"optimised 'matrix' 'data.frame' constructor.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/matrix_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert matrix to data.frame — matrix_df","text":"","code":"matrix_df(x, keep.attrs = FALSE)"},{"path":"https://shikokuchuo.net/ichimoku/reference/matrix_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert matrix to data.frame — matrix_df","text":"x matrix. keep.attrs [default FALSE] set TRUE, preserve custom attributes set original object.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/matrix_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert matrix to data.frame — matrix_df","text":"'data.frame' object. matrix row names, retained dataframe.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/matrix_df.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert matrix to data.frame — matrix_df","text":"optimised data.frame constructors used internally within package made available utilities. Please note data validation checking performed.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/matrix_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert matrix to data.frame — matrix_df","text":"","code":"cloud <- ichimoku(sample_ohlc_data) mcloud <- as.matrix(cloud) df <- matrix_df(mcloud) str(df) #> 'data.frame':\t281 obs. of 12 variables: #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... str(rownames(df)) #> chr [1:281] \"2020-01-02\" \"2020-01-03\" \"2020-01-06\" \"2020-01-07\" ..."},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":null,"dir":"Reference","previous_headings":"","what":"mlgrid Numeric Representation — mlgrid","title":"mlgrid Numeric Representation — mlgrid","text":"Create grid ichimoku indicator conditions next period returns. grid facilitates comparison strategy returns provides basis use machine learning applications. Translates visual representation relationship cloud chart elements numerical format analysis.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"mlgrid Numeric Representation — mlgrid","text":"","code":"mlgrid( x, y = c(\"logret\", \"ret\", \"none\"), k = 1L, dir = c(\"long\", \"short\"), type = c(\"boolean\", \"numeric\", \"z-score\"), format = c(\"dataframe\", \"matrix\"), unique = TRUE, expr = list() )"},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"mlgrid Numeric Representation — mlgrid","text":"x ichimoku object. y [default 'logret'] choose target variable 'logret' (log returns), 'ret' (discrete returns), 'none'. k [default 1L] number periods time horizon calculate target variable 'y'. dir [default 'long'] trade direction, either 'long' 'short'. type [default 'boolean'] choose 'boolean', 'numeric' 'z-score'. 'boolean' creates grid dummy variables ichimoku indicator conditions form 1 c1 > c2, 0 otherwise. 'numeric' creates grid numeric difference c1 - c2. 'z-score' standardises numeric grid mean standard deviation feature. format [default 'dataframe'] select either 'dataframe' 'matrix' format returned object. unique [default TRUE] return unique combinations c1 c2. Set FALSE return c1 > c2 c2 > c1. expr [default list()] (advanced use ) named list quoted language objects expressions, evaluated internally within function, referencing intermediate objects : 'core', coredata matrix ichimoku object, 'xlen' number observations, function parameters etc. evaluated expression must return vector length 'xlen' inclusion grid.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"mlgrid Numeric Representation — mlgrid","text":"data.frame matrix 'tidy' format one observation per row one feature per column target 'y' first column (unless set 'none'). 'y' 'k' parameters, trade direction grid type set attributes, 'means' 'sdevs' also populated type 'z-score' return mean standard deviation column. view , use look returned object.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"mlgrid Numeric Representation — mlgrid","text":"date-time index corresponds indicator condition met close period. return k-period return achieved transacting immediately following opening price next opening price. valid combinations included. excludes combination involving 'open' effect lagged indicator contemporaneous. following trivial highly-collinear pairs also excluded: (high, close), (low, close), (low, high), (cloudTop, Senkou ), (cloudBase, senkou ), (cloudTop, senkouB), (cloudBase, senkouB), (cloudBase, cloudTop).","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"mlgrid Numeric Representation — mlgrid","text":"Please refer strategies vignette calling: vignette(\"strategies\", package = \"ichimoku\")","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"mlgrid Numeric Representation — mlgrid","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") grid <- mlgrid(cloud, y = \"ret\", k = 2, dir = \"short\", type = \"z-score\") str(grid) #> 'data.frame':\t152 obs. of 38 variables: #> $ y : num -0.00645 0.00242 -0.00321 -0.00242 -0.0016 ... #> $ chikou_close : num -1.086 -0.79 -0.79 -0.856 -0.757 ... #> $ chikou_high : num -0.964 -0.85 -0.768 -0.752 -0.719 ... #> $ chikou_low : num -1.061 -0.866 -0.85 -0.898 -0.833 ... #> $ chikou_tenkan : num -0.783 -0.67 -0.751 -0.945 -0.88 ... #> $ chikou_kijun : num -0.631 -0.514 -0.498 -0.531 -0.431 ... #> $ chikou_senkouA : num -0.326 -0.218 -0.203 -0.241 -0.169 ... #> $ chikou_senkouB : num -0.709 -0.58 -0.562 -0.599 -0.489 ... #> $ chikou_cloudT : num -0.345 -0.238 -0.222 -0.253 -0.161 ... #> $ chikou_cloudB : num -0.714 -0.581 -0.562 -0.609 -0.519 ... #> $ close_tenkan : num 0.783 1.092 1.036 0.643 0.615 ... #> $ close_kijun : num -0.527 -0.313 -0.237 -0.298 -0.114 ... #> $ close_senkouA : num -0.724 -0.606 -0.64 -0.757 -0.673 ... #> $ close_senkouB : num -0.841 -0.711 -0.692 -0.729 -0.618 ... #> $ close_cloudT : num -0.62 -0.499 -0.534 -0.655 -0.568 ... #> $ close_cloudB : num -0.983 -0.852 -0.834 -0.871 -0.759 ... #> $ high_tenkan : num 0.698 0.793 0.856 0.412 0.38 ... #> $ high_kijun : num -0.643 -0.548 -0.404 -0.468 -0.277 ... #> $ high_senkouA : num -0.784 -0.733 -0.733 -0.852 -0.767 ... #> $ high_senkouB : num -0.904 -0.847 -0.791 -0.829 -0.716 ... #> $ high_cloudT : num -0.682 -0.629 -0.629 -0.753 -0.664 ... #> $ high_cloudB : num -1.047 -0.99 -0.934 -0.971 -0.859 ... #> $ low_tenkan : num 0.362 1.029 1.492 0.855 0.652 ... #> $ low_kijun : num -0.7564 -0.3619 -0.0129 -0.195 -0.1039 ... #> $ low_senkouA : num -0.846 -0.63 -0.513 -0.696 -0.663 ... #> $ low_senkouB : num -0.976 -0.736 -0.552 -0.662 -0.607 ... #> $ low_cloudT : num -0.751 -0.526 -0.405 -0.595 -0.56 ... #> $ low_cloudB : num -1.113 -0.873 -0.689 -0.799 -0.744 ... #> $ tenkan_kijun : num -1.283 -1.221 -1.077 -0.871 -0.604 ... #> $ tenkan_senkouA : num -1.041 -1.014 -1.032 -1.032 -0.932 ... #> $ tenkan_senkouB : num -1.145 -1.116 -1.078 -0.981 -0.855 ... #> $ tenkan_cloudT : num -0.948 -0.919 -0.938 -0.938 -0.833 ... #> $ tenkan_cloudB : num -1.29 -1.261 -1.222 -1.125 -0.999 ... #> $ kijun_senkouA : num -0.706 -0.706 -0.829 -0.965 -0.992 ... #> $ kijun_senkouB : num -0.666 -0.666 -0.702 -0.702 -0.702 ... #> $ kijun_cloudT : num -0.507 -0.507 -0.63 -0.767 -0.795 ... #> $ kijun_cloudB : num -0.909 -0.909 -0.948 -0.948 -0.948 ... #> $ senkouA_senkouB: num -0.0681 -0.0681 0.0317 0.198 0.2312 ... #> - attr(*, \"y\")= chr \"ret\" #> - attr(*, \"k\")= int 2 #> - attr(*, \"direction\")= chr \"short\" #> - attr(*, \"type\")= chr \"z-score\" #> - attr(*, \"ticker\")= chr \"TKR\" #> - attr(*, \"means\")= num [1:37] 1.414 0.691 2.222 1.646 2.241 ... #> - attr(*, \"sdevs\")= num [1:37] 6.09 6.11 6.15 6.19 6.01 ... custom <- mlgrid(cloud, type = \"numeric\", expr = list(cd = quote(core[, \"cd\"]))) str(custom) #> 'data.frame':\t153 obs. of 39 variables: #> $ y : num 0.007273 -0.000805 -0.001613 0.004831 -0.002413 ... #> $ chikou_close : num -5.2 -3.4 -3.4 -3.8 -3.2 ... #> $ chikou_high : num -5.2 -4.5 -4 -3.9 -3.7 ... #> $ chikou_low : num -4.3 -3.1 -3 -3.3 -2.9 ... #> $ chikou_tenkan : num -3.2 -2.5 -3 -4.2 -3.8 ... #> $ chikou_kijun : num -1.55 -0.85 -0.75 -0.95 -0.35 ... #> $ chikou_senkouA : num 1.3 2 2.1 1.85 2.33 ... #> $ chikou_senkouB : num 0.4 1.1 1.2 1 1.6 ... #> $ chikou_cloudT : num 0.4 1.1 1.2 1 1.6 ... #> $ chikou_cloudB : num 1.3 2 2.1 1.85 2.33 ... #> $ close_tenkan : num 1.9 2.45 2.35 1.65 1.6 ... #> $ close_kijun : num -0.5 0.2 0.45 0.25 0.85 ... #> $ close_senkouA : num -2.38 -1.67 -1.88 -2.57 -2.08 ... #> $ close_senkouB : num -1.55 -0.85 -0.75 -0.95 -0.35 ... #> $ close_cloudT : num -2.38 -1.67 -1.88 -2.57 -2.08 ... #> $ close_cloudB : num -1.55 -0.85 -0.75 -0.95 -0.35 ... #> $ high_tenkan : num 2.3 2.45 2.55 1.85 1.8 ... #> $ high_kijun : num -0.1 0.2 0.65 0.45 1.05 ... #> $ high_senkouA : num -1.97 -1.67 -1.67 -2.38 -1.88 ... #> $ high_senkouB : num -1.15 -0.85 -0.55 -0.75 -0.15 ... #> $ high_cloudT : num -1.97 -1.67 -1.67 -2.38 -1.88 ... #> $ high_cloudB : num -1.15 -0.85 -0.55 -0.75 -0.15 ... #> $ low_tenkan : num 0.3 1.45 2.25 1.15 0.8 ... #> $ low_kijun : num -2.1 -0.8 0.35 -0.25 0.05 ... #> $ low_senkouA : num -3.97 -2.67 -1.97 -3.07 -2.88 ... #> $ low_senkouB : num -3.15 -1.85 -0.85 -1.45 -1.15 ... #> $ low_cloudT : num -3.97 -2.67 -1.97 -3.07 -2.88 ... #> $ low_cloudB : num -3.15 -1.85 -0.85 -1.45 -1.15 ... #> $ tenkan_kijun : num -2.4 -2.25 -1.9 -1.4 -0.75 ... #> $ tenkan_senkouA : num -4.27 -4.12 -4.22 -4.22 -3.67 ... #> $ tenkan_senkouB : num -3.45 -3.3 -3.1 -2.6 -1.95 ... #> $ tenkan_cloudT : num -4.27 -4.12 -4.22 -4.22 -3.67 ... #> $ tenkan_cloudB : num -3.45 -3.3 -3.1 -2.6 -1.95 ... #> $ kijun_senkouA : num -1.88 -1.88 -2.33 -2.83 -2.93 ... #> $ kijun_senkouB : num -1.05 -1.05 -1.2 -1.2 -1.2 ... #> $ kijun_cloudT : num -1.88 -1.88 -2.33 -2.83 -2.93 ... #> $ kijun_cloudB : num -1.05 -1.05 -1.2 -1.2 -1.2 ... #> $ senkouA_senkouB: num 0.825 0.825 1.125 1.625 1.725 ... #> $ cd : num 1 1 -1 -1 1 -1 1 1 1 1 ... #> - attr(*, \"y\")= chr \"logret\" #> - attr(*, \"k\")= int 1 #> - attr(*, \"direction\")= chr \"long\" #> - attr(*, \"type\")= chr \"numeric\" #> - attr(*, \"ticker\")= chr \"TKR\" #> - attr(*, \"means\")= logi NA #> - attr(*, \"sdevs\")= logi NA"},{"path":"https://shikokuchuo.net/ichimoku/reference/more.html","id":null,"dir":"Reference","previous_headings":"","what":"Print More Rows of Ichimoku Objects — more","title":"Print More Rows of Ichimoku Objects — more","text":"calling invoking default print method ichimoku objects, console output display -- omitted x rows entire data fit -screen. Use () display rows.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/more.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print More Rows of Ichimoku Objects — more","text":"","code":"more(rows)"},{"path":"https://shikokuchuo.net/ichimoku/reference/more.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print More Rows of Ichimoku Objects — more","text":"rows (optional) specify number rows print; defaults rows supplied non-numeric.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/more.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print More Rows of Ichimoku Objects — more","text":"ichimoku object contained .Last.value (invisibly) else invisible NULL (.Last.value ichimoku object). ichimoku object data printed console.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/more.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print More Rows of Ichimoku Objects — more","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") cloud #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB chikou #> 2020-01-02 123.0 123.1 122.5 122.7 -1 NA NA NA NA 122.8 #> 2020-01-03 122.7 122.8 122.6 122.8 1 NA NA NA NA 122.9 #> 2020-01-06 122.8 123.4 122.4 123.3 1 NA NA NA NA 123.0 #> 2020-01-07 123.3 124.3 123.3 124.1 1 NA NA NA NA 123.9 #> 2020-01-08 124.1 124.8 124.0 124.8 1 NA NA NA NA 123.6 #> 2020-01-09 124.8 125.4 124.5 125.3 1 NA NA NA NA 122.5 #> 2020-01-10 125.3 125.3 124.8 125.2 -1 NA NA NA NA 122.6 #> 2020-01-13 125.2 125.3 125.1 125.2 0 NA NA NA NA 123.0 #> 2020-01-14 125.2 125.2 124.3 124.4 -1 123.90 NA NA NA 123.1 #> 2020-01-15 124.4 124.5 123.7 123.9 -1 123.90 NA NA NA 122.1 #> 2020-01-16 123.9 124.4 123.8 124.2 1 123.90 NA NA NA 121.9 #> 2020-01-17 124.2 124.3 123.0 123.5 -1 124.20 NA NA NA 121.1 #> 2020-01-20 123.5 123.8 123.1 123.2 -1 124.20 NA NA NA 121.4 #> 2020-01-21 123.6 123.6 123.4 123.6 0 124.20 NA NA NA 121.5 #> 2020-01-22 123.5 124.0 123.3 123.5 0 124.15 NA NA NA 121.9 #> 2020-01-23 123.5 124.5 123.3 124.3 1 124.15 NA NA NA 120.9 #> 2020-01-24 124.3 124.4 124.0 124.2 -1 124.10 NA NA NA 121.0 #> 2020-01-27 124.2 124.2 122.7 123.0 -1 123.60 NA NA NA 120.8 #> 2020-01-28 123.0 123.6 122.7 123.1 1 123.60 NA NA NA 121.2 #> 2020-01-29 123.1 123.3 123.1 123.2 1 123.60 NA NA NA 121.6 #> 2020-01-30 123.2 123.2 122.8 123.1 -1 123.60 NA NA NA 121.1 #> 2020-01-31 123.1 123.5 123.0 123.2 1 123.60 NA NA NA 122.1 #> 2020-02-03 123.2 123.3 122.6 123.0 -1 123.55 NA NA NA 122.2 #> 2020-02-04 123.0 123.1 122.6 122.9 -1 123.55 NA NA NA 122.2 #> 2020-02-05 122.9 123.2 122.6 122.8 -1 123.50 NA NA NA 122.4 #> 2020-02-06 122.8 122.9 122.8 122.8 0 123.40 123.90 NA NA 122.4 #> cloudT cloudB #> 2020-01-02 NA NA #> 2020-01-03 NA NA #> 2020-01-06 NA NA #> 2020-01-07 NA NA #> 2020-01-08 NA NA #> 2020-01-09 NA NA #> 2020-01-10 NA NA #> 2020-01-13 NA NA #> 2020-01-14 NA NA #> 2020-01-15 NA NA #> 2020-01-16 NA NA #> 2020-01-17 NA NA #> 2020-01-20 NA NA #> 2020-01-21 NA NA #> 2020-01-22 NA NA #> 2020-01-23 NA NA #> 2020-01-24 NA NA #> 2020-01-27 NA NA #> 2020-01-28 NA NA #> 2020-01-29 NA NA #> 2020-01-30 NA NA #> 2020-01-31 NA NA #> 2020-02-03 NA NA #> 2020-02-04 NA NA #> 2020-02-05 NA NA #> 2020-02-06 NA NA #> [ reached getOption(\"max.print\") -- omitted 27 rows ] more(25) more()"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Price Data — oanda","title":"OANDA Price Data — oanda","text":"Retrieve price data major currencies, metals, commodities, government bonds stock indices OANDA fxTrade API.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Price Data — oanda","text":"","code":"oanda( instrument, granularity = c(\"D\", \"W\", \"M\", \"H12\", \"H8\", \"H6\", \"H4\", \"H3\", \"H2\", \"H1\", \"M30\", \"M15\", \"M10\", \"M5\", \"M4\", \"M2\", \"M1\", \"S30\", \"S15\", \"S10\", \"S5\"), count = NULL, from = NULL, to = NULL, price = c(\"M\", \"B\", \"A\"), server, apikey, quietly )"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Price Data — oanda","text":"instrument string containing base currency quote currency delimited '_' '-' (e.g. \"USD_JPY\" \"usd-jpy\"). Use oanda_instruments function return list valid instruments. granularity [default \"D\"] granularity price data fetch, one \"M\", \"W\", \"D\", \"H12\", \"H8\", \"H6\", \"H4\", \"H3\", \"H2\", \"H1\", \"M30\", \"M15\", \"M10\", \"M5\", \"M4\", \"M2\", \"M1\", \"S30\", \"S15\", \"S10\", \"S5\". count (optional) number periods return. API supports maximum 5000 individual request, defaults 500 specified. '' '' specified, 'count' ignored, time range combined 'granularity' determine number periods return. (optional) start time range fetch price data, format convertible POSIXct .POSIXct(), example \"2020-02-01\". (optional) end time range fetch price data, format convertible POSIXct .POSIXct(), example \"2020-06-30\". price [default \"M\"] pricing component, one \"M\" (midpoint), \"B\" (bid) \"\" (ask). server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified. quietly (optional) set TRUE, suppress printing auxiliary output console return quietly.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Price Data — oanda","text":"data.frame containing price data requested.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Price Data — oanda","text":"function queries OANDA fxTrade API. Requires fxTrade account OANDA https://www.oanda.com/forex-trading/. already hold live account, may register OANDA fxTrade practice / demo account. link OANDA fxTrade account profile page 'Manage API Access' (Account -> Services -> Manage API Access). , personal access token use OANDA API can generated, well revoked. oanda_set_key function can used save API key system credential store automatically recognised future (requires 'keyring' package installed).","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"OANDA Price Data — oanda","text":"Please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\"). 'OANDA' 'fxTrade' trademarks owned OANDA Corporation, entity unaffiliated ichimoku package.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Price Data — oanda","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run these examples prices <- oanda(\"USD_JPY\") ichimoku(prices) oanda(\"EUR_JPY\", granularity = \"H1\", count = 250, from = \"2020-02-01\", price = \"B\") } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Real-time Cloud Charts — oanda_chart","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"Plot real-time Ichimoku Kinko Hyo cloud charts major currencies, metals, commodities, government bonds stock indices using OANDA fxTrade API data.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"","code":"oanda_chart( instrument, granularity = c(\"D\", \"W\", \"M\", \"H12\", \"H8\", \"H6\", \"H4\", \"H3\", \"H2\", \"H1\", \"M30\", \"M15\", \"M10\", \"M5\", \"M4\", \"M2\", \"M1\", \"S30\", \"S15\", \"S10\", \"S5\"), refresh = 5, count = 250, price = c(\"M\", \"B\", \"A\"), theme = c(\"classic\", \"dark\", \"mono\", \"noguchi\", \"okabe-ito\", \"solarized\"), type = c(\"none\", \"r\", \"s\"), limit, server, apikey, ..., periods = c(9L, 26L, 52L) )"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"instrument string containing base currency quote currency delimited '_' '-' (e.g. \"USD_JPY\" \"usd-jpy\"). Use oanda_instruments function return list valid instruments. granularity [default \"D\"] granularity price data fetch, one \"M\", \"W\", \"D\", \"H12\", \"H8\", \"H6\", \"H4\", \"H3\", \"H2\", \"H1\", \"M30\", \"M15\", \"M10\", \"M5\", \"M4\", \"M2\", \"M1\", \"S30\", \"S15\", \"S10\", \"S5\". refresh [default 5] data refresh interval seconds, minimum 1. count [default 250] number periods return. API supports maximum 5000. Note fewer periods actually shown chart ensure full cloud always displayed. price [default \"M\"] pricing component, one \"M\" (midpoint), \"B\" (bid) \"\" (ask). theme [default 'classic'] choices 'dark', 'mono', 'noguchi', 'okabe-ito' 'solarized'. Alternatively, supply vector 12 colour values (hex codes names) user-defined theme. type [default 'none'] type sub-plot display beneath ichimoku cloud chart, choice 'none', 'r' 's' corresponding oscillator type. limit (optional) specify time seconds limit session. session end data returned automatically specified time elapsed. server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified. ... additional arguments passed along ichimoku calculating ichimoku cloud autoplot set chart parameters. periods [default c(9L, 26L, 52L)] vector defining length periods used cloud. parameter shoud normally modified using values invalid context traditional ichimoku analysis.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"ichimoku object underlying chart (invisibly) function exit. plot ichimoku chart price data requested output graphical device refresh interval.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"function polls OANDA fxTrade API latest live prices updates plot graphical device refresh interval. Use 'Esc' key stop updating. access underlying data, assign function object, example: cloud <- oanda_chart(\"USD_JPY\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"Please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run these examples oanda_chart(\"USD_JPY\") oanda_chart(\"EUR_JPY\", granularity = \"H1\", refresh = 3, count = 300, price = \"B\", theme = \"mono\") # Save data underlying chart at time of function exit cloud <- oanda_chart(\"USD_JPY\") } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_instruments.html","id":null,"dir":"Reference","previous_headings":"","what":"Available OANDA Instruments — oanda_instruments","title":"Available OANDA Instruments — oanda_instruments","text":"Return list instruments including major currencies, metals, commodities, government bonds stock indices pricing data available OANDA fxTrade API.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_instruments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Available OANDA Instruments — oanda_instruments","text":"","code":"oanda_instruments(server, apikey)"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_instruments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Available OANDA Instruments — oanda_instruments","text":"server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_instruments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Available OANDA Instruments — oanda_instruments","text":"data.frame containing instrument name, full display name, type.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_instruments.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Available OANDA Instruments — oanda_instruments","text":"function returns data.frame listing instrument names available account associated supplied OANDA fxTrade API key. details please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_instruments.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Available OANDA Instruments — oanda_instruments","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run this example oanda_instruments() } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_orders.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Order Book — oanda_orders","title":"OANDA Order Book — oanda_orders","text":"Provides summary aggregate orders posted OANDA fxTrade clients price level.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_orders.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Order Book — oanda_orders","text":"","code":"oanda_orders(instrument, time, server, apikey)"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_orders.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Order Book — oanda_orders","text":"instrument string containing base currency quote currency delimited '_' '-' (e.g. \"USD_JPY\" \"usd-jpy\"). Use oanda_instruments function return list valid instruments. time (optional) time retrieve order book, format convertible POSIXct .POSIXct(). specified, recent order book retrieved. server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_orders.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Order Book — oanda_orders","text":"Invisibly, data frame order book parameters saved attributes. chart showing percentage long short orders price level output graphical device.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_orders.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Order Book — oanda_orders","text":"feature implemented OANDA certain major currency pairs considered experimental. Note: certain orders placed far market price, interquartile range order levels shown chart. returned data frame however contain entire order book. details please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_orders.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Order Book — oanda_orders","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run this example oanda_orders(\"USD_JPY\") } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_positions.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Position Book — oanda_positions","title":"OANDA Position Book — oanda_positions","text":"Provides summary aggregate positions held OANDA fxTrade clients price level.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_positions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Position Book — oanda_positions","text":"","code":"oanda_positions(instrument, time, server, apikey)"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_positions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Position Book — oanda_positions","text":"instrument string containing base currency quote currency delimited '_' '-' (e.g. \"USD_JPY\" \"usd-jpy\"). Use oanda_instruments function return list valid instruments. time (optional) time retrieve position book, format convertible POSIXct .POSIXct(). specified, recent position book retrieved. server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_positions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Position Book — oanda_positions","text":"Invisibly, data frame position book parameters saved attributes. chart showing percentage long short positions price level output graphical device.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_positions.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Position Book — oanda_positions","text":"feature implemented OANDA certain major currency pairs considered experimental. details please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_positions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Position Book — oanda_positions","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run this example oanda_positions(\"USD_JPY\") } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_quote.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Quote Latest Price — oanda_quote","title":"OANDA Quote Latest Price — oanda_quote","text":"Provides single line price quote instrument.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_quote.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Quote Latest Price — oanda_quote","text":"","code":"oanda_quote(instrument, price = c(\"M\", \"B\", \"A\"), server, apikey)"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_quote.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Quote Latest Price — oanda_quote","text":"instrument string containing base currency quote currency delimited '_' '-' (e.g. \"USD_JPY\" \"usd-jpy\"). Use oanda_instruments function return list valid instruments. price [default \"M\"] pricing component, one \"M\" (midpoint), \"B\" (bid) \"\" (ask). server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_quote.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Quote Latest Price — oanda_quote","text":"Invisible NULL. instrument, timestamp, daily open, high, low last prices, percentage change open, pricing component (M mid, B bid, ask) output console.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_quote.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Quote Latest Price — oanda_quote","text":"function designed interactive use. details please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_quote.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Quote Latest Price — oanda_quote","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run this example oanda_quote(\"USD_JPY\") } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_set_key.html","id":null,"dir":"Reference","previous_headings":"","what":"Set OANDA fxTrade API Key — oanda_set_key","title":"Set OANDA fxTrade API Key — oanda_set_key","text":"Save OANDA fxTrade API key (personal access token) system credential store.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_set_key.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set OANDA fxTrade API Key — oanda_set_key","text":"","code":"oanda_set_key()"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_set_key.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set OANDA fxTrade API Key — oanda_set_key","text":"Invisible NULL. key set default keyring service name 'OANDA_API_KEY' practice accounts 'OANDA_LIVE_KEY' live accounts.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_set_key.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set OANDA fxTrade API Key — oanda_set_key","text":"key read interactively. Separate keys can set practice live accounts - please choose correct account type prompted. function needs called set key; need called session. function dependency 'keyring' package.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_set_key.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"Set OANDA fxTrade API Key — oanda_set_key","text":"Please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_set_key.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set OANDA fxTrade API Key — oanda_set_key","text":"","code":"if (interactive()) { # Only run example in interactive R sessions oanda_set_key() }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Streaming Data — oanda_stream","title":"OANDA Streaming Data — oanda_stream","text":"Stream live price liquidity data major currencies, metals, commodities, government bonds stock indices OANDA fxTrade Streaming API.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Streaming Data — oanda_stream","text":"","code":"oanda_stream(instrument, display = 8L, limit, server, apikey)"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Streaming Data — oanda_stream","text":"instrument string containing base currency quote currency delimited '_' '-' (e.g. \"USD_JPY\" \"usd-jpy\"). Use oanda_instruments function return list valid instruments. display [default 8L] integer rows data display console one time. limit (optional) specify time seconds limit streaming session. session end data returned automatically specified time elapsed. server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Streaming Data — oanda_stream","text":"Returned invisibly, dataframe containing data streaming session function exit. latest rows dataframe printed console, governed 'display' argument.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Streaming Data — oanda_stream","text":"function connects OANDA fxTrade Streaming API. Send interrupt using 'Esc' key 'Ctrl+c' stop stream return session data. Note: messages type 'PRICE' processed. Messages type 'HEARTBEAT' consisting timestamp discarded.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"streaming-data","dir":"Reference","previous_headings":"","what":"Streaming Data","title":"OANDA Streaming Data — oanda_stream","text":"Summarised streaming API documentation: Pricing stream include every single price created Account 4 prices sent per second (every 250 milliseconds) instrument one price created 250 millisecond window, price effect end window sent means periods rapid price movement, every price sent Pricing windows different connections stream aligned way (e.g. top second) means periods rapid price movement, different prices may observed depending alignment connection","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"OANDA Streaming Data — oanda_stream","text":"Please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Streaming Data — oanda_stream","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run this example data <- oanda_stream(\"USD_JPY\", display = 8L) } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Studio Interactive Live Analysis — oanda_studio","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"Interactive fully-customisable R Shiny environment providing real-time Ichimoku Kinko Hyo cloud charts major currencies, metals, commodities, government bonds stock indices using OANDA fxTrade API data. Intuitive cursor infotip provides ready access data directly chart.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"","code":"oanda_studio( instrument = \"USD_JPY\", granularity = c(\"D\", \"W\", \"M\", \"H12\", \"H8\", \"H6\", \"H4\", \"H3\", \"H2\", \"H1\", \"M30\", \"M15\", \"M10\", \"M5\", \"M4\", \"M2\", \"M1\", \"S30\", \"S15\", \"S10\", \"S5\"), refresh = 5, count = 300, price = c(\"M\", \"B\", \"A\"), theme = c(\"classic\", \"dark\", \"mono\", \"noguchi\", \"okabe-ito\", \"solarized\"), type = c(\"none\", \"r\", \"s\"), server, apikey, new.process = FALSE, ..., launch.browser = TRUE, periods = c(9L, 26L, 52L) )"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"instrument [default 'USD_JPY'] string containing base currency quote currency delimited '_'. Use oanda_instruments function return list valid instruments. granularity [default \"D\"] granularity price data fetch, one \"M\", \"W\", \"D\", \"H12\", \"H8\", \"H6\", \"H4\", \"H3\", \"H2\", \"H1\", \"M30\", \"M15\", \"M10\", \"M5\", \"M4\", \"M2\", \"M1\", \"S30\", \"S15\", \"S10\", \"S5\". refresh [default 5] data refresh interval seconds, minimum 1. count [default 300] number periods return, 100 800. Note fewer periods actually shown chart ensure full cloud always displayed. price [default \"M\"] pricing component, one \"M\" (midpoint), \"B\" (bid) \"\" (ask). theme [default 'original'] alternative choices 'conceptual', 'dark', 'fresh', 'mono', 'solarized'. type [default 'none'] type sub-plot display beneath ichimoku cloud chart, choice 'none', 'r' 's' corresponding oscillator type. server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified. new.process [default FALSE] TRUE, start shiny session new R process, unblocking current process allowing continued use R console. ... additional arguments passed along ichimoku calculating ichimoku cloud, autoplot set chart parameters, 'options' argument shiny::shinyApp(). launch.browser [default TRUE] TRUE, system's default web browser launched automatically app started. value argument can also function call application's URL. use default Shiny viewer RStudio, please specify getOption(\"shiny.launch.browser\"). periods [default c(9L, 26L, 52L)] vector defining length periods used cloud. parameter shoud normally modified using values invalid context traditional ichimoku analysis.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"Invisible NULL, 'mirai' 'new.process' specified TRUE. default arguments, Shiny app launched default browser.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"function polls OANDA fxTrade API latest prices updates customisable reactive Shiny app refresh interval.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"Please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run these examples oanda_studio() # To open in RStudio viewer instead of default browser oanda_studio(launch.browser = getOption(\"shiny.launch.browser\")) } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_switch.html","id":null,"dir":"Reference","previous_headings":"","what":"Switch Default OANDA Server — oanda_switch","title":"Switch Default OANDA Server — oanda_switch","text":"Switch default OANDA fxTrade server 'practice' 'live' vice versa. Settings persist current session .","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_switch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Switch Default OANDA Server — oanda_switch","text":"","code":"oanda_switch()"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_switch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Switch Default OANDA Server — oanda_switch","text":"Invisible NULL. message informs resulting default server setting.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_switch.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Switch Default OANDA Server — oanda_switch","text":"default server start new session practice server. Call function switch live server. function can used toggle practice live servers. cached variables API key, account instruments list cleared time function called. details please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_switch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Switch Default OANDA Server — oanda_switch","text":"","code":"oanda_switch() #> Default OANDA server switched to 'live' oanda_switch() #> Default OANDA server switched to 'practice'"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_view.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA View Market Performance — oanda_view","title":"OANDA View Market Performance — oanda_view","text":"Provides snapshot overview markets intraday basis, showing relative performance individual constituents.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_view.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA View Market Performance — oanda_view","text":"","code":"oanda_view( market = c(\"allfx\", \"bonds\", \"commodities\", \"fx\", \"metals\", \"stocks\"), price = c(\"M\", \"B\", \"A\"), server, apikey )"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_view.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA View Market Performance — oanda_view","text":"market string specifying market: 'allfx' available currencies, 'bonds' government bonds, 'commodities' commodities, 'fx' major currency pairs, 'metals' metals 'stocks' global stock markets. price [default \"M\"] pricing component, one \"M\" (midpoint), \"B\" (bid) \"\" (ask). server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_view.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA View Market Performance — oanda_view","text":"data.frame containing daily open, high, low last prices, along percentage price change open, ordered percentage change. instrument names set row names. first timestamp retrieved pricing component printed console well saved attributes dataframe. dataframe also printed console.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_view.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA View Market Performance — oanda_view","text":"function designed interactive use. details please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_view.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA View Market Performance — oanda_view","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run this example oanda_view(\"fx\") } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/plot.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Ichimoku Cloud Chart — plot.ichimoku","title":"Plot Ichimoku Cloud Chart — plot.ichimoku","text":"Plot Ichimoku Kinko Hyo cloud charts ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/plot.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Ichimoku Cloud Chart — plot.ichimoku","text":"","code":"# S3 method for class 'ichimoku' plot( x, window, ticker, subtitle, theme = c(\"classic\", \"dark\", \"mono\", \"noguchi\", \"okabe-ito\", \"solarized\"), strat = TRUE, type = c(\"none\", \"r\", \"s\", \"bar\", \"line\"), custom, ... )"},{"path":"https://shikokuchuo.net/ichimoku/reference/plot.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Ichimoku Cloud Chart — plot.ichimoku","text":"x object class 'ichimoku'. window (optional) date-time window subset plot, ISO-8601 compatible range strings format used 'xts' objects, example \"2020-02-15/2020-08-15\" \"2020-02-15/\", \"/2020-08\" \"2020-07\". ticker (optional) specify ticker (text) include chart heading. set, ticker saved within ichimoku object used. subtitle (optional) specify subtitle display chart title. theme [default 'classic'] choices 'dark', 'mono', 'noguchi', 'okabe-ito' 'solarized'. Alternatively, supply vector 12 colour values (hex codes names) user-defined theme. strat [default TRUE] ichimoku object contains strategy, periods strategy results position shaded, strategy printed chart subtitle (otherwise specified). Set FALSE turn behaviour. type [default 'none'] type sub-plot display beneath ichimoku cloud chart, choice 'none', 'r' 's' corresponding oscillator type, 'bar' 'line' custom plots. custom (optional) character string (containing regular expression) matching column name variable displayed sub-plot. Specify type = 'bar' type = 'line', otherwise type settings take precedence. ... additional arguments passed along print method 'ggplot' objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/plot.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Ichimoku Cloud Chart — plot.ichimoku","text":"ichimoku object supplied (invisibly). requested plot output graphical device.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/plot.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot Ichimoku Cloud Chart — plot.ichimoku","text":"function S3 method generic function plot() class 'ichimoku'. can invoked calling plot(x) object 'x' class 'ichimoku'. details please refer reference vignette calling: vignette(\"reference\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/plot.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot Ichimoku Cloud Chart — plot.ichimoku","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") plot(cloud) plot(cloud, window = \"2020-05-01/2020-12-01\", theme = \"dark\") plot(cloud, window = \"2020-05/\", ticker = \"TKR Co.\", theme = \"noguchi\", type = \"s\") plot(cloud, window = \"/2020-11-02\", subtitle = \"Sample Price Data\", theme = \"mono\", type = \"r\") kumo <- ichimoku(sample_ohlc_data, ticker = \"TKR\", keep.data = TRUE) plot(kumo, window = \"2020-05/\", theme = \"solarized\", type = \"bar\", custom = \"volume\") plot(kumo, window = \"2020-05/\", theme = \"okabe-ito\", type = \"line\", custom = \"volume\")"},{"path":"https://shikokuchuo.net/ichimoku/reference/print.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Print Ichimoku Objects — print.ichimoku","title":"Print Ichimoku Objects — print.ichimoku","text":"Default print method ichimoku objects enable automatic plotting ichimoku cloud chart.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/print.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print Ichimoku Objects — print.ichimoku","text":"","code":"# S3 method for class 'ichimoku' print(x, plot = TRUE, rows = 26L, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/print.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print Ichimoku Objects — print.ichimoku","text":"x object class 'ichimoku'. plot [default TRUE] set FALSE prevent automatic plotting ichimoku cloud chart. rows [default 26L] integer number rows print. ... additional arguments passed along xts print plot.ichimoku methods.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/print.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print Ichimoku Objects — print.ichimoku","text":"ichimoku object supplied (invisibly). data printed console. ichimoku cloud chart also output graphical device depending parameters set.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/print.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Print Ichimoku Objects — print.ichimoku","text":"function S3 method generic function print() class 'ichimoku'. can invoked calling print(x) object 'x' class 'ichimoku'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/print.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print Ichimoku Objects — print.ichimoku","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") print(cloud) #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB chikou #> 2020-01-02 123.0 123.1 122.5 122.7 -1 NA NA NA NA 122.8 #> 2020-01-03 122.7 122.8 122.6 122.8 1 NA NA NA NA 122.9 #> 2020-01-06 122.8 123.4 122.4 123.3 1 NA NA NA NA 123.0 #> 2020-01-07 123.3 124.3 123.3 124.1 1 NA NA NA NA 123.9 #> 2020-01-08 124.1 124.8 124.0 124.8 1 NA NA NA NA 123.6 #> 2020-01-09 124.8 125.4 124.5 125.3 1 NA NA NA NA 122.5 #> 2020-01-10 125.3 125.3 124.8 125.2 -1 NA NA NA NA 122.6 #> 2020-01-13 125.2 125.3 125.1 125.2 0 NA NA NA NA 123.0 #> 2020-01-14 125.2 125.2 124.3 124.4 -1 123.90 NA NA NA 123.1 #> 2020-01-15 124.4 124.5 123.7 123.9 -1 123.90 NA NA NA 122.1 #> 2020-01-16 123.9 124.4 123.8 124.2 1 123.90 NA NA NA 121.9 #> 2020-01-17 124.2 124.3 123.0 123.5 -1 124.20 NA NA NA 121.1 #> 2020-01-20 123.5 123.8 123.1 123.2 -1 124.20 NA NA NA 121.4 #> 2020-01-21 123.6 123.6 123.4 123.6 0 124.20 NA NA NA 121.5 #> 2020-01-22 123.5 124.0 123.3 123.5 0 124.15 NA NA NA 121.9 #> 2020-01-23 123.5 124.5 123.3 124.3 1 124.15 NA NA NA 120.9 #> 2020-01-24 124.3 124.4 124.0 124.2 -1 124.10 NA NA NA 121.0 #> 2020-01-27 124.2 124.2 122.7 123.0 -1 123.60 NA NA NA 120.8 #> 2020-01-28 123.0 123.6 122.7 123.1 1 123.60 NA NA NA 121.2 #> 2020-01-29 123.1 123.3 123.1 123.2 1 123.60 NA NA NA 121.6 #> 2020-01-30 123.2 123.2 122.8 123.1 -1 123.60 NA NA NA 121.1 #> 2020-01-31 123.1 123.5 123.0 123.2 1 123.60 NA NA NA 122.1 #> 2020-02-03 123.2 123.3 122.6 123.0 -1 123.55 NA NA NA 122.2 #> 2020-02-04 123.0 123.1 122.6 122.9 -1 123.55 NA NA NA 122.2 #> 2020-02-05 122.9 123.2 122.6 122.8 -1 123.50 NA NA NA 122.4 #> 2020-02-06 122.8 122.9 122.8 122.8 0 123.40 123.90 NA NA 122.4 #> cloudT cloudB #> 2020-01-02 NA NA #> 2020-01-03 NA NA #> 2020-01-06 NA NA #> 2020-01-07 NA NA #> 2020-01-08 NA NA #> 2020-01-09 NA NA #> 2020-01-10 NA NA #> 2020-01-13 NA NA #> 2020-01-14 NA NA #> 2020-01-15 NA NA #> 2020-01-16 NA NA #> 2020-01-17 NA NA #> 2020-01-20 NA NA #> 2020-01-21 NA NA #> 2020-01-22 NA NA #> 2020-01-23 NA NA #> 2020-01-24 NA NA #> 2020-01-27 NA NA #> 2020-01-28 NA NA #> 2020-01-29 NA NA #> 2020-01-30 NA NA #> 2020-01-31 NA NA #> 2020-02-03 NA NA #> 2020-02-04 NA NA #> 2020-02-05 NA NA #> 2020-02-06 NA NA #> [ reached getOption(\"max.print\") -- omitted 27 rows ] print(cloud, plot = FALSE, rows = 20L) #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB chikou #> 2020-01-02 123.0 123.1 122.5 122.7 -1 NA NA NA NA 122.8 #> 2020-01-03 122.7 122.8 122.6 122.8 1 NA NA NA NA 122.9 #> 2020-01-06 122.8 123.4 122.4 123.3 1 NA NA NA NA 123.0 #> 2020-01-07 123.3 124.3 123.3 124.1 1 NA NA NA NA 123.9 #> 2020-01-08 124.1 124.8 124.0 124.8 1 NA NA NA NA 123.6 #> 2020-01-09 124.8 125.4 124.5 125.3 1 NA NA NA NA 122.5 #> 2020-01-10 125.3 125.3 124.8 125.2 -1 NA NA NA NA 122.6 #> 2020-01-13 125.2 125.3 125.1 125.2 0 NA NA NA NA 123.0 #> 2020-01-14 125.2 125.2 124.3 124.4 -1 123.90 NA NA NA 123.1 #> 2020-01-15 124.4 124.5 123.7 123.9 -1 123.90 NA NA NA 122.1 #> 2020-01-16 123.9 124.4 123.8 124.2 1 123.90 NA NA NA 121.9 #> 2020-01-17 124.2 124.3 123.0 123.5 -1 124.20 NA NA NA 121.1 #> 2020-01-20 123.5 123.8 123.1 123.2 -1 124.20 NA NA NA 121.4 #> 2020-01-21 123.6 123.6 123.4 123.6 0 124.20 NA NA NA 121.5 #> 2020-01-22 123.5 124.0 123.3 123.5 0 124.15 NA NA NA 121.9 #> 2020-01-23 123.5 124.5 123.3 124.3 1 124.15 NA NA NA 120.9 #> 2020-01-24 124.3 124.4 124.0 124.2 -1 124.10 NA NA NA 121.0 #> 2020-01-27 124.2 124.2 122.7 123.0 -1 123.60 NA NA NA 120.8 #> 2020-01-28 123.0 123.6 122.7 123.1 1 123.60 NA NA NA 121.2 #> 2020-01-29 123.1 123.3 123.1 123.2 1 123.60 NA NA NA 121.6 #> cloudT cloudB #> 2020-01-02 NA NA #> 2020-01-03 NA NA #> 2020-01-06 NA NA #> 2020-01-07 NA NA #> 2020-01-08 NA NA #> 2020-01-09 NA NA #> 2020-01-10 NA NA #> 2020-01-13 NA NA #> 2020-01-14 NA NA #> 2020-01-15 NA NA #> 2020-01-16 NA NA #> 2020-01-17 NA NA #> 2020-01-20 NA NA #> 2020-01-21 NA NA #> 2020-01-22 NA NA #> 2020-01-23 NA NA #> 2020-01-24 NA NA #> 2020-01-27 NA NA #> 2020-01-28 NA NA #> 2020-01-29 NA NA #> [ reached getOption(\"max.print\") -- omitted 21 rows ]"},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":null,"dir":"Reference","previous_headings":"","what":"Relative Numeric Representation — relative","title":"Relative Numeric Representation — relative","text":"Produce statistical summary latest numeric representation ichimoku cloud chart relative historical values. determining whether current trading falls within outside normal ranges.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Relative Numeric Representation — relative","text":"","code":"relative(x, order = FALSE, signif = 0.2, quietly)"},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Relative Numeric Representation — relative","text":"x ichimoku object. order [default FALSE] set TRUE order results absolute 'z-score'. signif [default 0.2] set significance threshold 'p' equal lower, element starred '*'. quietly (optional) set TRUE, suppress printing additional output console return quietly.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Relative Numeric Representation — relative","text":"data frame containing statistical summary latest ichimoku cloud chart representation relation historical values. addition, time index latest observed values total number datapoints printed console.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Relative Numeric Representation — relative","text":"'mean(X)' mean value element X, 'sd(X)' standard deviation, 'X[n]' nth latest observed values. 'res' residual X[n] - mean(X) represents centred measure deviation latest observed value. 'z-score' (standard score) calculated res / sd(X) centred scaled measure deviation latest observed value. 'p >= |z|' represents empirical probability latest observed absolute 'z-score' greater. 'p*' display star 'p >= |z|' less equal value argument 'signif'. 'E(|res|)|p' represents mean expected absolute value 'res', conditional upon absolute 'z-score' greater equal latest observed absolute 'z-score'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"Relative Numeric Representation — relative","text":"Please refer strategies vignette calling: vignette(\"strategies\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Relative Numeric Representation — relative","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") statistics <- relative(cloud, quietly = TRUE) relative(cloud, signif = 0.4) #> Latest: 2020-12-24 00:00:00 | n: 155 #> mean(X) sd(X) X[n] res z-score p >= |z| p* E(|res|)|p #> chikou_close 1.51 6.07 7.00 5.49 0.91 0.39 * 8.53 #> chikou_high 0.79 6.09 6.60 5.81 0.95 0.36 * 8.91 #> chikou_low 2.31 6.12 7.80 5.49 0.90 0.41 8.40 #> chikou_tenkan 1.73 6.15 6.90 5.17 0.84 0.41 8.70 #> chikou_kijun 2.28 5.96 4.90 2.62 0.44 0.63 6.84 #> chikou_senkouA 3.44 6.46 4.75 1.31 0.20 0.89 6.26 #> chikou_senkouB 4.26 5.40 4.35 0.09 0.02 1.00 4.76 #> chikou_cloudT 2.67 6.44 4.35 1.68 0.26 0.84 6.59 #> chikou_cloudB 5.03 5.20 4.75 -0.28 -0.05 0.99 4.60 #> close_tenkan 0.52 1.77 1.70 1.18 0.67 0.52 2.19 #> close_kijun 1.27 3.25 3.85 2.58 0.79 0.48 4.26 #> close_senkouA 2.00 5.93 5.90 3.90 0.66 0.49 7.71 #> close_senkouB 3.02 5.34 5.75 2.73 0.51 0.73 5.79 #> close_cloudT 1.27 5.73 5.75 4.48 0.78 0.43 7.94 #> close_cloudB 3.75 5.31 5.90 2.15 0.40 0.70 5.90 #> high_tenkan 1.21 1.56 1.90 0.69 0.44 0.66 1.65 #> high_kijun 1.96 3.12 4.05 2.09 0.67 0.53 3.91 #> high_senkouA 2.69 5.84 6.10 3.41 0.58 0.56 7.16 #> high_senkouB 3.71 5.29 5.95 2.24 0.42 0.76 5.61 #> high_cloudT 1.96 5.64 5.95 3.99 0.71 0.48 7.46 #> high_cloudB 4.44 5.27 6.10 1.66 0.32 0.71 5.80 #> low_tenkan -0.30 1.72 1.30 1.60 0.93 0.40 * 2.37 #> low_kijun 0.44 3.28 3.45 3.01 0.92 0.43 4.50 #> low_senkouA 1.18 5.97 5.50 4.32 0.72 0.45 8.12 #> low_senkouB 2.19 5.38 5.35 3.16 0.59 0.64 6.25 #> low_cloudT 0.45 5.76 5.35 4.90 0.85 0.43 8.02 #> low_cloudB 2.92 5.38 5.50 2.58 0.48 0.68 6.04 #> tenkan_kijun 0.75 2.42 2.15 1.40 0.58 0.60 2.79 #> tenkan_senkouA 1.48 5.44 4.20 2.72 0.50 0.57 6.61 #> tenkan_senkouB 2.49 5.12 4.05 1.56 0.30 0.79 5.26 #> tenkan_cloudT 0.75 5.20 4.05 3.30 0.63 0.50 6.82 #> tenkan_cloudB 3.23 5.12 4.20 0.97 0.19 0.79 5.17 #> kijun_senkouA 0.74 3.64 2.05 1.31 0.36 0.69 4.05 #> kijun_senkouB 1.75 4.16 1.90 0.15 0.04 0.97 3.50 #> kijun_cloudT 0.00 3.62 1.90 1.90 0.52 0.64 4.18 #> kijun_cloudB 2.48 3.86 2.05 -0.43 -0.11 0.98 3.31 #> senkouA_senkouB 1.01 2.98 -0.15 -1.16 -0.39 0.70 3.27 relative(cloud, order = TRUE, signif = 0.4) #> Latest: 2020-12-24 00:00:00 | n: 155 #> mean(X) sd(X) X[n] res z-score p >= |z| p* E(|res|)|p #> chikou_high 0.79 6.09 6.60 5.81 0.95 0.36 * 8.91 #> low_tenkan -0.30 1.72 1.30 1.60 0.93 0.40 * 2.37 #> low_kijun 0.44 3.28 3.45 3.01 0.92 0.43 4.50 #> chikou_close 1.51 6.07 7.00 5.49 0.91 0.39 * 8.53 #> chikou_low 2.31 6.12 7.80 5.49 0.90 0.41 8.40 #> low_cloudT 0.45 5.76 5.35 4.90 0.85 0.43 8.02 #> chikou_tenkan 1.73 6.15 6.90 5.17 0.84 0.41 8.70 #> close_kijun 1.27 3.25 3.85 2.58 0.79 0.48 4.26 #> close_cloudT 1.27 5.73 5.75 4.48 0.78 0.43 7.94 #> low_senkouA 1.18 5.97 5.50 4.32 0.72 0.45 8.12 #> high_cloudT 1.96 5.64 5.95 3.99 0.71 0.48 7.46 #> high_kijun 1.96 3.12 4.05 2.09 0.67 0.53 3.91 #> close_tenkan 0.52 1.77 1.70 1.18 0.67 0.52 2.19 #> close_senkouA 2.00 5.93 5.90 3.90 0.66 0.49 7.71 #> tenkan_cloudT 0.75 5.20 4.05 3.30 0.63 0.50 6.82 #> low_senkouB 2.19 5.38 5.35 3.16 0.59 0.64 6.25 #> high_senkouA 2.69 5.84 6.10 3.41 0.58 0.56 7.16 #> tenkan_kijun 0.75 2.42 2.15 1.40 0.58 0.60 2.79 #> kijun_cloudT 0.00 3.62 1.90 1.90 0.52 0.64 4.18 #> close_senkouB 3.02 5.34 5.75 2.73 0.51 0.73 5.79 #> tenkan_senkouA 1.48 5.44 4.20 2.72 0.50 0.57 6.61 #> low_cloudB 2.92 5.38 5.50 2.58 0.48 0.68 6.04 #> high_tenkan 1.21 1.56 1.90 0.69 0.44 0.66 1.65 #> chikou_kijun 2.28 5.96 4.90 2.62 0.44 0.63 6.84 #> high_senkouB 3.71 5.29 5.95 2.24 0.42 0.76 5.61 #> close_cloudB 3.75 5.31 5.90 2.15 0.40 0.70 5.90 #> senkouA_senkouB 1.01 2.98 -0.15 -1.16 -0.39 0.70 3.27 #> kijun_senkouA 0.74 3.64 2.05 1.31 0.36 0.69 4.05 #> high_cloudB 4.44 5.27 6.10 1.66 0.32 0.71 5.80 #> tenkan_senkouB 2.49 5.12 4.05 1.56 0.30 0.79 5.26 #> chikou_cloudT 2.67 6.44 4.35 1.68 0.26 0.84 6.59 #> chikou_senkouA 3.44 6.46 4.75 1.31 0.20 0.89 6.26 #> tenkan_cloudB 3.23 5.12 4.20 0.97 0.19 0.79 5.17 #> kijun_cloudB 2.48 3.86 2.05 -0.43 -0.11 0.98 3.31 #> chikou_cloudB 5.03 5.20 4.75 -0.28 -0.05 0.99 4.60 #> kijun_senkouB 1.75 4.16 1.90 0.15 0.04 0.97 3.50 #> chikou_senkouB 4.26 5.40 4.35 0.09 0.02 1.00 4.76"},{"path":"https://shikokuchuo.net/ichimoku/reference/sample_ohlc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample OHLC Price Data — sample_ohlc_data","title":"Sample OHLC Price Data — sample_ohlc_data","text":"Simulated prices hypothetical financial asset. Created purpose demonstrating package functions examples vignettes .","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/sample_ohlc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample OHLC Price Data — sample_ohlc_data","text":"","code":"sample_ohlc_data"},{"path":"https://shikokuchuo.net/ichimoku/reference/sample_ohlc_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Sample OHLC Price Data — sample_ohlc_data","text":"data frame 256 observations 6 variables: time - timestamp observation [POSIXct] open - opening price [numeric] low - low price [numeric] high - high price [numeric] close - closing price [numeric] volume - volume [integer]","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/sample_ohlc_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Sample OHLC Price Data — sample_ohlc_data","text":"applicable: simulated data","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/sample_ohlc_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample OHLC Price Data — sample_ohlc_data","text":"","code":"head(sample_ohlc_data) #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842"},{"path":"https://shikokuchuo.net/ichimoku/reference/str.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Display the Structure of Ichimoku Objects — str.ichimoku","title":"Display the Structure of Ichimoku Objects — str.ichimoku","text":"Compactly display internal structure ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/str.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display the Structure of Ichimoku Objects — str.ichimoku","text":"","code":"# S3 method for class 'ichimoku' str(object, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/str.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Display the Structure of Ichimoku Objects — str.ichimoku","text":"object object class 'ichimoku'. ... arguments passed methods.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/str.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Display the Structure of Ichimoku Objects — str.ichimoku","text":"Invisible NULL. compact display structure object output console.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/str.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Display the Structure of Ichimoku Objects — str.ichimoku","text":"function S3 method generic function str() class 'ichimoku'. can invoked calling str(x) object 'x' class 'ichimoku'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/str.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display the Structure of Ichimoku Objects — str.ichimoku","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") str(cloud) #> ichimoku object [2020-01-02 / 2021-02-01] (281, 12) #> $open $high $low $close $cd $tenkan $kijun $senkouA $senkouB $chikou $cloudT $cloudB #> index: 2020-01-02 ... 2021-02-01 #> attributes: #> periods: 9 26 52 #> periodicity: 1 days #> ticker: TKR strat <- strat(cloud) str(strat) #> ichimoku object [2020-01-02 / 2021-02-01] (281, 19) w/ strat #> $open $high $low $close $cd $tenkan $kijun $senkouA $senkouB $chikou $cloudT $cloudB $cond $posn $txn $logret $slogret $ret $sret #> index: 2020-01-02 ... 2021-02-01 #> attributes: #> periods: 9 26 52 #> periodicity: 1 days #> ticker: TKR #> strat: [strategy: close > tenkan w/ direction: long... ]"},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Ichimoku Strategies — strat","title":"Create Ichimoku Strategies — strat","text":"Create ichimoku cloud strategies using indicator condition 'long / short c1 > c2'. Complex strategies can formulated combined 'c1 > c2 & c3 > c4' (conditions must satisfied) asymmetric 'c1 > c2 x c3 > c4' ('c1 > c2' denotes entry 'c3 > c4' exit indicator).","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Ichimoku Strategies — strat","text":"","code":"strat( x, c1 = c(\"close\", \"chikou\", \"open\", \"high\", \"low\", \"tenkan\", \"kijun\", \"senkouA\", \"senkouB\", \"cloudT\", \"cloudB\"), c2 = c(\"tenkan\", \"kijun\", \"senkouA\", \"senkouB\", \"cloudT\", \"cloudB\", \"chikou\", \"close\", \"open\", \"high\", \"low\"), c3 = c(\"close\", \"chikou\", \"open\", \"high\", \"low\", \"tenkan\", \"kijun\", \"senkouA\", \"senkouB\", \"cloudT\", \"cloudB\"), c4 = c(\"tenkan\", \"kijun\", \"senkouA\", \"senkouB\", \"cloudT\", \"cloudB\", \"chikou\", \"close\", \"open\", \"high\", \"low\"), dir = c(\"long\", \"short\"), type = 2 )"},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Ichimoku Strategies — strat","text":"x ichimoku object. c1 [default 'close'] column name specified string. c2 [default 'tenkan'] column name specified string. c3 (optional) column name specified string. c4 (optional) column name specified string. dir [default 'long'] trade direction, either 'long' 'short'. type [default 2] 'c3' 'c4' specified, type 2 create combined strategy 'c1 > c2 & c3 > c4' whilst type 3 create asymmetric strategy 'c1 > c2 x c3 > c4'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Ichimoku Strategies — strat","text":"ichimoku object augmented strategy.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create Ichimoku Strategies — strat","text":"following assumption applies strategies: confirmation whether condition satisfied received 'close' particular period, transaction initiated immediately following 'open'. transactions occur 'open'. default, periods strategy results position shaded ichimoku cloud chart strategy printed chart message (otherwise specified). turn behaviour, pass strat = FALSE argument plot() iplot().","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"ichimoku-object-specification-for-strategies","dir":"Reference","previous_headings":"","what":"Ichimoku Object Specification for Strategies","title":"Create Ichimoku Strategies — strat","text":"ichimoku object augmented following additional elements: Columns [numeric]: $cond: boolean vector indicator condition met $posn: boolean vector indicating position held $txn: vector representing transactions implement position (1 = enter position, -1 = exit position) $logret: vector log returns $slogret: vector log returns strategy $ret: vector discrete returns $sret: vector discrete returns strategy Attributes: $strat: strategy summary [matrix] strategy summary may accessed summary() method ichimoku objects via look.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"complex-strategies","dir":"Reference","previous_headings":"","what":"Complex Strategies","title":"Create Ichimoku Strategies — strat","text":"complex strategies: 's1' denotes strategy 'c1 > c2' 's2' denotes strategy 'c3 > c4'. Combined strategy 's1 & s2': indicator conditions 's1' 's2' met simulateneously position taken. column $cond show conditions met Asymmetric strategy 's1 x s2': indicator condition 's1' met enter position, indicator condition 's2' exit position. rules applied recursively length data. column $cond show indicator condition met 's1'","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"Create Ichimoku Strategies — strat","text":"Please refer strategies vignette calling: vignette(\"strategies\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Ichimoku Strategies — strat","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") strat <- strat(cloud, c1 = \"tenkan\", c2 = \"cloudB\", dir = \"short\") summary(strat) #> [,1] #> Strategy \"tenkan > cloudB\" #> --------------------- \"----------\" #> Strategy cuml return % 10 #> Per period mean ret % 0.0536 #> Periods in market 127 #> Total trades 4 #> Average trade length 31.75 #> Trade success % 75 #> Worst trade ret % -1.42 #> --------------------- \"----------\" #> Benchmark cuml ret % -5.24 #> Per period mean ret % -0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"short\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" plot(strat) strat2 <- strat(cloud, c1 = \"cloudT\", c2 = \"kijun\", c3 = \"cloudT\", c4 = \"close\") summary(strat2) #> [,1] #> Strategy \"cloudT > kijun & cloudT > close\" #> --------------------- \"----------\" #> Strategy cuml return % 9.82 #> Per period mean ret % 0.0527 #> Periods in market 63 #> Total trades 5 #> Average trade length 12.6 #> Trade success % 80 #> Worst trade ret % -0.97 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" plot(strat2)"},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine Ichimoku Strategies — stratcombine","title":"Combine Ichimoku Strategies — stratcombine","text":"Create custom strategies combining existing strategies contained ichimoku objects 's1' 's2' form 's1 & s2'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine Ichimoku Strategies — stratcombine","text":"","code":"stratcombine(s1, s2)"},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine Ichimoku Strategies — stratcombine","text":"s1 ichimoku object containing strategy. s2 ichimoku object containing strategy.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine Ichimoku Strategies — stratcombine","text":"ichimoku object augmented combined strategy.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Combine Ichimoku Strategies — stratcombine","text":"combined strategy 's1 & s2' means indicator conditions 's1' 's2' met simulateneously trade position taken. boolean values showing whether conditions met stored 'cond' column. strategy summary may accessed summary() method ichimoku objects via look.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"Combine Ichimoku Strategies — stratcombine","text":"Please refer strategies vignette calling: vignette(\"strategies\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combine Ichimoku Strategies — stratcombine","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") strat1 <- strat(cloud, c1 = \"close\", c2 = \"kijun\") strat2 <- strat(cloud, c1 = \"cloudB\", c2 = \"tenkan\") cstrat <- stratcombine(strat1, strat2) summary(cstrat) #> [,1] #> Strategy \"close > kijun & cloudB > tenkan\" #> --------------------- \"----------\" #> Strategy cuml return % 7.32 #> Per period mean ret % 0.0397 #> Periods in market 18 #> Total trades 3 #> Average trade length 6 #> Trade success % 100 #> Worst trade ret % 0.53 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" plot(cstrat)"},{"path":"https://shikokuchuo.net/ichimoku/reference/summary.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","title":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","text":"Display summary information ichimoku object strategy.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/summary.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","text":"","code":"# S3 method for class 'ichimoku' summary(object, strat = TRUE, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/summary.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","text":"object object class 'ichimoku'. strat [default TRUE] show strategy summary present. Set FALSE show object summary instead. ... arguments passed methods.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/summary.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","text":"matrix containing strategy summary, present 'strat' set TRUE, otherwise character vector containing abbreviated object summary (full object summary output console).","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/summary.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","text":"function S3 method generic function summary() class 'ichimoku'. can invoked calling summary(x) object 'x' class 'ichimoku'. Performs basic validation ichimoku object inform ichimoku object contains invalid information.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/summary.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") summary(cloud) #> ichimoku object with dimensions (281, 12) #> #> Max: 2020-07-13 23:00:00 [139.7] #> Start: 2020-01-02 00:00:00 [123] End: 2020-12-24 00:00:00 [136] #> Min: 2020-05-12 23:00:00 [119.1] #> #> Cloud periods: 9 26 52 #> Periodicity: 1 days #> Ticker: TKR strat <- strat(cloud) summary(strat) #> [,1] #> Strategy \"close > tenkan\" #> --------------------- \"----------\" #> Strategy cuml return % 8.57 #> Per period mean ret % 0.0334 #> Periods in market 138 #> Total trades 20 #> Average trade length 6.9 #> Trade success % 35 #> Worst trade ret % -2.54 #> --------------------- \"----------\" #> Benchmark cuml ret % 9 #> Per period mean ret % 0.035 #> Periods in market 246 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-01-15 #> End 2020-12-23 #> Ticker \"TKR\""},{"path":"https://shikokuchuo.net/ichimoku/reference/tradingDays.html","id":null,"dir":"Reference","previous_headings":"","what":"Select Trading Days — tradingDays","title":"Select Trading Days — tradingDays","text":"Used ichimoku subset vector dates trading days.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/tradingDays.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select Trading Days — tradingDays","text":"","code":"tradingDays(x, holidays, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/tradingDays.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select Trading Days — tradingDays","text":"x vector POSIXct date objects. holidays (optional) vector, function outputs vector, dates defined holidays. Set NULL continuously-traded market. ... arguments used function.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/tradingDays.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select Trading Days — tradingDays","text":"vector logical values: TRUE corresponding element 'x' weekday holiday, FALSE otherwise. , parameter 'holidays' set NULL, vector TRUE values length 'x'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/tradingDays.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Select Trading Days — tradingDays","text":"New Year's Day (01-01) Christmas Day (12-25) defined holidays default 'holidays' specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/tradingDays.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Select Trading Days — tradingDays","text":"","code":"dates <- seq(from = as.POSIXct(\"2020-01-01\"), by = \"1 day\", length.out = 7) dates #> [1] \"2020-01-01 UTC\" \"2020-01-02 UTC\" \"2020-01-03 UTC\" \"2020-01-04 UTC\" #> [5] \"2020-01-05 UTC\" \"2020-01-06 UTC\" \"2020-01-07 UTC\" tradingDays(dates) #> [1] FALSE TRUE TRUE FALSE FALSE TRUE TRUE tradingDays(dates, holidays = c(\"2020-01-02\", \"2020-01-03\")) #> [1] TRUE FALSE FALSE FALSE FALSE TRUE TRUE tradingDays(dates, holidays = NULL) #> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE"},{"path":"https://shikokuchuo.net/ichimoku/reference/xts_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert xts to data.frame — xts_df","title":"Convert xts to data.frame — xts_df","text":"optimised 'xts' 'data.frame' constructor.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/xts_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert xts to data.frame — xts_df","text":"","code":"xts_df(x, keep.attrs = FALSE)"},{"path":"https://shikokuchuo.net/ichimoku/reference/xts_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert xts to data.frame — xts_df","text":"x 'xts' object. keep.attrs [default FALSE] set TRUE, preserve custom attributes set original object.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/xts_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert xts to data.frame — xts_df","text":"'data.frame' object. 'xts' index preserved first column header 'index'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/xts_df.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert xts to data.frame — xts_df","text":"optimised data.frame constructors used internally within package made available utilities. Please note data validation checking performed.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/xts_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert xts to data.frame — xts_df","text":"","code":"cloud <- ichimoku(sample_ohlc_data) df <- xts_df(cloud) str(df) #> 'data.frame':\t281 obs. of 13 variables: #> $ index : POSIXct, format: \"2020-01-02 00:00:00\" \"2020-01-03 00:00:00\" ... #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... df2 <- xts_df(cloud, keep.attrs = TRUE) str(df2) #> 'data.frame':\t281 obs. of 13 variables: #> $ index : POSIXct, format: \"2020-01-02 00:00:00\" \"2020-01-03 00:00:00\" ... #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... #> - attr(*, \"periods\")= int [1:3] 9 26 52 #> - attr(*, \"periodicity\")= num 86400 #> - attr(*, \"ticker\")= chr \"sample_ohlc_data\""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-5-4-9000","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.5.4.9000 (development)","text":"Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-154","dir":"Changelog","previous_headings":"","what":"ichimoku 1.5.4","title":"ichimoku 1.5.4","text":"CRAN release: 2024-08-18","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-5-4","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.5.4","text":"Fixes cases asymmetric (type 3) strategies generating final entry signal corresponding exit condition yet met (thanks @bbac63 #9). Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-153","dir":"Changelog","previous_headings":"","what":"ichimoku 1.5.3","title":"ichimoku 1.5.3","text":"CRAN release: 2024-06-23","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-5-3","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.5.3","text":"Internal performance enhancements. Requires secretbase >= 1.0.0.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-152","dir":"Changelog","previous_headings":"","what":"ichimoku 1.5.2","title":"ichimoku 1.5.2","text":"CRAN release: 2024-06-04","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-5-2","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.5.2","text":"archive() reverts using SHA256. Requires nanonext >= 1.0.0 mirai >= 1.0.0.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-151","dir":"Changelog","previous_headings":"","what":"ichimoku 1.5.1","title":"ichimoku 1.5.1","text":"CRAN release: 2024-04-10","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-5-1","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.5.1","text":"Fixes oanda_studio() live chart longer greys updating (recent Shiny versions).","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-150","dir":"Changelog","previous_headings":"","what":"ichimoku 1.5.0","title":"ichimoku 1.5.0","text":"CRAN release: 2024-02-05","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-5-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.5.0","text":"Note: archive files created using earlier package versions can longer verified using archive() may nevertheless loaded using readRDS().","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-5-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.5.0","text":"Requires secretbase.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-1413","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.13","title":"ichimoku 1.4.13","text":"CRAN release: 2024-01-15","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-13","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.13","text":"oanda_quote() now correctly writes new line quote. Internal performance enhancements. Requires nanonext >= 0.12.0 mirai >= 0.12.0.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-1412","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.12","title":"ichimoku 1.4.12","text":"CRAN release: 2023-12-15","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-12","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.12","text":"Uses ‘mirai’ run oanda_studio(new.process = TRUE) Fixes oanda_switch() regression 1.4.11. Updates internal OANDA instruments list. Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-1411","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.11","title":"ichimoku 1.4.11","text":"CRAN release: 2023-12-08","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-4-11","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.4.11","text":"Allows using environment variable ‘OANDA_API_KEY’ alternative ‘keyring’ package.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-11","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.11","text":"Arguments ‘keep.data’ ‘keep.attrs’ across package now explicit default value FALSE (resultant change behaviour). Internal performance enhancements. Requires nanonext >= 0.11.0.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-1410","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.10","title":"ichimoku 1.4.10","text":"CRAN release: 2023-10-28","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-10","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.10","text":"Improves handling OANDA API errors.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-149","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.9","title":"ichimoku 1.4.9","text":"CRAN release: 2023-09-03","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-9","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.9","text":"Internal performance enhancements. Requires nanonext >= 0.10.0 R >= 3.5.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-148","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.8","title":"ichimoku 1.4.8","text":"CRAN release: 2023-08-24","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-8","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.8","text":"Ensures compatibility upcoming {nanonext} releases. Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-147","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.7","title":"ichimoku 1.4.7","text":"CRAN release: 2023-08-07","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-7","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.7","text":"Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-146","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.6","title":"ichimoku 1.4.6","text":"CRAN release: 2023-04-29","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-6","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.6","text":"Switches C interface provided ‘RcppSimdJson’ JSON parsing. Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-145","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.5","title":"ichimoku 1.4.5","text":"CRAN release: 2023-02-15","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-5","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.5","text":"mlgrid() argument ‘func’ becomes ‘expr’ takes named list quoted language objects expressions rather functions versatility custom calculations (advanced use). Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-144","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.4","title":"ichimoku 1.4.4","text":"CRAN release: 2023-01-09","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-4","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.4","text":"oanda_instruments() retries encountering non-success server status code (eliminating potential error calling OANDA function first time session). Updates internal OANDA instruments list. Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-143","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.3","title":"ichimoku 1.4.3","text":"CRAN release: 2022-12-08","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-4-3","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.4.3","text":"mlgrid() gains argument ‘func’ supplying named list functions custom calculations (advanced use). Also, choosing type z-score, now returns ‘means’ ‘sdevs’ used standardise grid attributes.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-3","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.3","text":"Improved performance reliability oanda_stream(). Returned dataframe longer contains column ‘type’, always ‘PRICE’. Fixes ichimoku() validation code POSIXct handling changes upcoming R 4.3.0. longer attempts plot single row (subset) ichimoku object. API changes ‘ggplot2’ require version >= 3.4.0; R version requirement consequently raised 3.3. Improved stability OANDA functions requiring nanonext >= 0.7.0. Switch ‘jsonlite’ ‘RcppSimdJson’ JSON parsing. Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-142","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.2","title":"ichimoku 1.4.2","text":"CRAN release: 2022-10-16","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-2","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.2","text":"Implements fix upcoming R 4.3.0 (thanks @kalibera). Internal changes requiring nanonext >= 0.6.0.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-141","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.1","title":"ichimoku 1.4.1","text":"CRAN release: 2022-09-25","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-1","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.1","text":"Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-140","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.0","title":"ichimoku 1.4.0","text":"CRAN release: 2022-09-08","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-4-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.4.0","text":"New print method ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.0","text":"conjunction new print method, () now defaults printing rows default unless ‘rows’ specified. SHA-256 authentication archive() faster upgrade use ‘MbedTLS’ library via ‘nanonext’. archive() now returns filename saving archive rather NULL. as_tibble method ichimoku objects removed. OANDA functions now use ‘nanonext’ retrieve data instead ‘curl’. ‘curl’, ‘tibble’ ‘openssl’ dependencies retired.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-134","dir":"Changelog","previous_headings":"","what":"ichimoku 1.3.4","title":"ichimoku 1.3.4","text":"CRAN release: 2022-08-23","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-3-4","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.3.4","text":"Moves ‘shiny’ ‘imports’ ‘suggests’. Updates internal OANDA instruments list.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-133","dir":"Changelog","previous_headings":"","what":"ichimoku 1.3.3","title":"ichimoku 1.3.3","text":"CRAN release: 2022-07-04","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-3-3","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.3.3","text":"Fixed regression 1.3.2 caused iplot() fail.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-132","dir":"Changelog","previous_headings":"","what":"ichimoku 1.3.2","title":"ichimoku 1.3.2","text":"CRAN release: 2022-06-23","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-3-2","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.3.2","text":"default ‘original’ theme renamed ‘classic’ ‘fresh’ replaced ‘okabe-ito’ theme (using colours colourblind-friendly palette) ‘conceptual’ theme renamed ‘noguchi’ (palette inspired works Isamu Noguchi)","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-131","dir":"Changelog","previous_headings":"","what":"ichimoku 1.3.1","title":"ichimoku 1.3.1","text":"CRAN release: 2022-05-23","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-3-1","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.3.1","text":"theme argument plot() oanda_chart() now accepts user-defined vector 12 colour values (hex values R colour names).","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-3-1","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.3.1","text":"Minor UI tweaks internal performance optimisations.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-130","dir":"Changelog","previous_headings":"","what":"ichimoku 1.3.0","title":"ichimoku 1.3.0","text":"CRAN release: 2022-02-21","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-3-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.3.0","text":"Sub-plots now feature chart values can read via infotip iplot() oanda_studio(). R/S-type indicators now option oanda_chart() oanda_studio(). .ichimoku() introduced faster technical utility version ichimoku() use data already prescribed format.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-3-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.3.0","text":"Dependency C++ compiler, ‘cpp11’ ‘gtable’ packages retired. Internal rolling min/max/mean functions re-implemented directly C; various ichimoku functions now call C code internally. Added LinkingTo: xts use C function exported ‘xts’. df_trim() extraplot() removed longer required. ‘limit’ argument oanda_chart() oanda_stream() changed accept time seconds rather minutes. new.process = TRUE oanda_studio() now portable works Windows. Fixes oanda_stream() multiple bid/ask liquidity levels returned stream. Returned dataframe now revised tidier format correct data types ease processing. Fixes archive() work correctly R-oldrel (4.0). performance enhancements ichimoku(), mlgrid() plot functions. Documentation refresh.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-125","dir":"Changelog","previous_headings":"","what":"ichimoku 1.2.5","title":"ichimoku 1.2.5","text":"CRAN release: 2021-12-13","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-2-5","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.2.5","text":"Enhancement printing ichimoku objects utilising ‘tibble’ print method (adds dependency ‘tibble’ package), paired () quick printing rows. Optimised as_tibble() method implemented ichimoku objects. k specify k-period time horizon calculate target variable ‘y’. type = 'z-score' produce standard score ‘numeric’ type grid. format choose returning dataframe matrix. New oanda_orders() function provides OANDA fxTrade order book certain major currency pairs. Major revamp oanda_stream() much improved interface now renders stream structured dataframe. oanda_chart() oanda_stream() gain argument ‘limit’ imposes time limit session data returned automatically. oanda_positions() gains parameter ‘time’ retrieving position book particular time. archive() gains ability save files interactively using system dialog - call function object, leaving second argument empty e.g. archive(object, ). index() gains parameter ‘subset’ fast subsetting ichimoku cloud indexes. New plot themes ‘conceptual’ ‘fresh’.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-2-5","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.2.5","text":"Simplification look() removing ‘’ argument. extract ichimoku objects autostrat lists, subset list directly. object argument now optional, accessing .Last.value otherwise. Minor enhancements str() method. df_append() argument order ‘old’ ‘new’ swapped allow chaining pipe operator. archive() now safe use non-interactive settings, longer prompts confirm overwriting existing files. oanda_view() updated new instruments now returns correct data types dataframe. Fixes cases relative() showing incorrect date ‘latest’, along cosmetic changes. General performance improvements date handling dataframe conversions. Documentation refresh.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-124","dir":"Changelog","previous_headings":"","what":"ichimoku 1.2.4","title":"ichimoku 1.2.4","text":"CRAN release: 2021-10-18","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-2-4","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.2.4","text":"New relative() function produces statistical summary latest ichimoku cloud chart numeric representation relative historical values, determining whether trading falls within outside normal ranges. oanda_studio() gains argument ‘new.process’, set TRUE, starts shiny session new R process, unblocking current process allowing continued use console. mlgrid() gains argument y = 'none' grid latest cloud representation without ‘y’. autostrat(), relative() oanda() gain argument ‘quietly’ suppresses additional console output set TRUE. Improved time index handling ichimoku(): conversion .POSIXct() fails, convert numeric values POSIX times (appropriate warning). Optimised ‘ichimoku’ methods coredata() index() generic functions. ‘ichimoku’ method .data.frame() implemented marginally faster version xts_df() ichimoku objects. informative custom str() summary() methods implemented ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-2-4","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.2.4","text":"OANDA functions, ‘server’ parameter specified, corresponding API key now retrieved rather default, allowing example oanda_studio(server = \"live\", new.process = TRUE) Improved appearance progress indicators oanda() oanda_view(). oanda() now safe use non-interactively - longer prompt cases. Improvements visual appearance oscillator plots. Update interactive interface oanda_set_key(). Fixes sign %chg oanda_quote(). xts() longer re-exported ‘xts’ package ichimoku() can now fully re-construct ichimoku object components (see ‘Working ichimoku objects’ Reference vignette). performance improvements ichimoku() functions. Documentation refresh.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-122","dir":"Changelog","previous_headings":"","what":"ichimoku 1.2.2","title":"ichimoku 1.2.2","text":"CRAN release: 2021-10-05","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-2-2","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.2.2","text":"New oanda_quote() function outputs latest quote instrument along intraday trading statistics console. New oanda_view() function provides latest overview entire market - showing relative performance constituents. New oanda_positions() function provides OANDA fxTrade position book (% longs shorts price level) certain major currency pairs. archive() now allows files chosen interactively using system dialog - call function arguments. df_append() utility now faster gains arguments ‘key’ ‘keep.attr’.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-2-2","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.2.2","text":"Accessibility improvements: default ‘original’ theme adjusted accommodate colour vision deficiency. OANDA functions now prompt missing required arguments instead returning errors. ease use, ‘instrument’ argument OANDA functions now case-insensitive delimiter may supplied either ’_’ ‘-’, oanda(\"usd-jpy\") oanda(\"USD_JPY\") acceptable. tradingDays() argument ‘noholidays’ removed favour ‘holidays = NULL’. Logic changed slightly default holidays applied ‘holidays’ specified. Minor performance improvements OANDA ML layer functions. Documentation refresh","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-121","dir":"Changelog","previous_headings":"","what":"ichimoku 1.2.1","title":"ichimoku 1.2.1","text":"CRAN release: 2021-09-23","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-2-1","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.2.1","text":"Fix issue ‘bslib’ theming release Shiny 1.7.0. improved reliability, ‘bslib’ optional dependency removed. neutral formatting oanda_stream() output accommodate different console colour schemes. Fix cases mis-alignment main sub-plots, axis label formatting custom plots. Fix issue caused iplot() re-calculate indicators adjusting data window. Package dependency switched ‘gridExtra’ ‘gtable’. Minor performance improvements ichimoku() functions.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-120","dir":"Changelog","previous_headings":"","what":"ichimoku 1.2.0","title":"ichimoku 1.2.0","text":"CRAN release: 2021-09-20","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-2-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.2.0","text":"ichimoku() adds ability create pseudo cloud charts single series price data OHLC data available. ichimoku() gains ‘keep.data’ argument retaining additional data present input object. Plot functions gain ‘type’ argument enable choice oscillator (R-type S-type) shown sub-plot. Plot functions gain ‘custom’ argument enable custom data variable plot line bar chart sub-plot area. oanda_studio() adds button saving underlying data live ichimoku cloud chart using archive(). oanda_chart() now returns underlying ichimoku object (invisibly) function exit, providing easy access chart data. oanda_set_key() adds support storing practice live account API keys. New oanda_switch() function allows default server switched ‘practice’ ‘live’ session.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-2-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.2.0","text":"Adds fallback oanda_instruments() using internal instruments table API call fails. plot.ichimoku() now returns original object invisibly, use autoplot() extraplot() return plot objects. plot functions, argument ‘message’ renamed ‘subtitle’. Plots now show Tenkan-sen Kijun-sen. Slight adjustments original theme: cloud edges now plum-tinted Senkou , cyan-tinted Senkou B. Fixes certain cases calculation future cloud fail data frequency lower daily. Updates sample_ohlc_data add volume column, adhere working days etc. OANDA internal functions re-implemented encapsulated closure list. oanda_get_key() removed functionality incorporated elsewhere. New sub-plot functionality adds ‘gridExtra’ package dependency. ‘rlang’ package dependency retired longer required. Internal C++ code: now includes required cpp11 headers, adds rolling mean function, miscellaneous improvements. Minor performance improvements ichimoku(), plot functions, OANDA functions various utilities. Documentation refresh.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-110","dir":"Changelog","previous_headings":"","what":"ichimoku 1.1.0","title":"ichimoku 1.1.0","text":"CRAN release: 2021-08-23","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-1-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.1.0","text":"archive() moves using native RData format, enabling R object stored perfectly sha256 verification.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-1-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.1.0","text":"‘ArrowTabular’ method ichimoku() removed ‘arrow’ optional dependency retired. Fixes data types issue affecting dataframes returned oanda() v1.0.0. Fixes critical issues affecting Solaris platform v1.0.0.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-100","dir":"Changelog","previous_headings":"","what":"ichimoku 1.0.0","title":"ichimoku 1.0.0","text":"CRAN release: 2021-08-17","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-object-specification-v1-release-1-0-0","dir":"Changelog","previous_headings":"","what":"ichimoku object specification v1 release:","title":"ichimoku 1.0.0","text":"ichimoku objects created v0.x longer work correctly newer versions package. Upgrade latest package version run ichimoku() previously-created objects re-create according new specification (data preserved).","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-0-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.0.0","text":"New archive() function allows archiving ichimoku objects files stored Apache Arrow IPC file format. Also uses sha256 hashing ensure data integrity archives - adds optional dependency openssl package. oanda() gains capability download 5000 data periods multiple (rate-limited) requests ‘’ ‘’ arguments specified. look() can now inspect R object. ichimoku() gains new S3 method ArrowTabular class working Arrow Tables. tradingDays() gets ‘noholidays’ argument use markets trade 24/7 non-trading days. iplot() oanda_studio() now use ‘bslib’ (Shiny dependency) enable theming entire UI rather just chart. Infotip candle direction symbols updated greater clarity. xts_df() matrix_df() dataframe constructors gain ‘keep.attrs’ argument. set TRUE, returned dataframe retain custom attributes original object. Re-export functions working ichimoku objects: index(), coredata() ‘zoo’, xts() ‘xts’ package.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-0-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.0.0","text":"Implements caching certain OANDA variables retrieved used throughout session. Charts daily lower frequency now prettier usefully-aligned breaks. Improved handling timezones: OANDA data charts now show correctly user timezone. oanda() arguments ‘’ ‘’ can now take date-time format convertible POSIXct. oanda_studio() subsets plot window always show full cloud, consistent behaviour oanda_chart(). oanda_chart() oanda_studio() add explicit support ‘periods’ argument passed ichimoku(). oanda_chart() now passes additional parameters autoplot(). ichimoku() now enforces data types price data higher certainty success, robust handling matrices ‘data.frame’ compatible formats ‘tibble’. Fixes issue caused oanda() return weekly data certain cases. Corrects trade success statistics short strategies returned strat(). following functions longer exported keep package tidy: grid_dup(), maxOver(), minOver(), oanda_accounts(). sample_ohlc_data slightly lengthened better demonstrate strat features. Package now links ‘cpp11’ headers, retiring ‘Rcpp’ package dependency. Package dependency ‘httr’ switched ‘curl’. Miscellaneous performance optimisations. Documentation refresh.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-030","dir":"Changelog","previous_headings":"","what":"ichimoku 0.3.0","title":"ichimoku 0.3.0","text":"CRAN release: 2021-07-22","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-0-3-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 0.3.0","text":"OANDA fxTrade API interface retrieving price data: new oanda(), oanda_stream() oanda_chart() functions. oanda_studio() complete live analysis envrionment using OANDA data R Shiny app. iplot() re-launched using R Shiny. Introduces intuitive cursor infotip allows data read directly chart. look() function viewing informational attributes objects created package, extracting ichimoku objects lists returned autostrat(). strat() autostrat() gain new type/level 3 asymmetric strategies using different indicators position entry exit.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-0-3-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 0.3.0","text":"New dependencies ‘httr’ ‘jsonlite’ packages, required OANDA fxTrade API interface. strat() now takes optional ‘c3’ ‘c4’ arguments provide parameters complex strategies. allows combined strategy specified using single strat() call. iplot() now uses Shiny backend. Plotly charts retired. Argument ‘gaps’ plot functions deprecated remains available gplot() time . Chikou span now top layer plots visible candlesticks. Performance enhancements principal functions, including optimised data validation error handling code. Certain helper functions renamed consistency. Documentation refresh.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-020","dir":"Changelog","previous_headings":"","what":"ichimoku 0.2.0","title":"ichimoku 0.2.0","text":"CRAN release: 2021-06-17","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-0-2-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 0.2.0","text":"Visualization layer: compute plot ichimoku cloud charts. Strategy layer: tools creating backtesting ichimoku strategies. ML layer: tools developing quantitative ichimoku solutions. New -greyscale ‘mono’ theme. tradingDays() helper function allow customisation holidays calculating future cloud.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-0-2-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 0.2.0","text":"Ichimoku object specification updated. Ichimoku objects now inherit ‘xts’ ‘zoo’ classes better integration econometrics analytics packages. Package now requires compilation adds ‘Rcpp’ dependency due rolling window functions minOver() maxOver() using custom C++ algorithm. ‘RcppRoll’ ‘timeDate’ package dependencies retired. sample_ohlc_data updated better demonstrate new features. Updated CRAN release status.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-012","dir":"Changelog","previous_headings":"","what":"ichimoku 0.1.2","title":"ichimoku 0.1.2","text":"CRAN release: 2021-05-19 Added sample synthetic pricing dataset examples vignettes. Documentation changes CRAN release.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-010","dir":"Changelog","previous_headings":"","what":"ichimoku 0.1.0","title":"ichimoku 0.1.0","text":"first pre-release ichimoku.","code":""}] +[{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement code@hibiki-ai.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://shikokuchuo.net/ichimoku/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.0, available https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://shikokuchuo.net/ichimoku/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"definition","dir":"Articles","previous_headings":"Ichimoku Kinko Hyo","what":"Definition","title":"ichimoku: Cloud Charts - The Reference Manual","text":"一目均衡表 Ichimoku Kinko Hyo [cloud chart] consists following lines added candlestick chart: 転換線 Tenkan-sen [conversion line]: mid-point highest high lowest low past 9 periods (including current period) 基準線 Kijun-sen [base line]: mid-point highest high lowest low past 26 periods (including current period) 先行スパン 1 Senkou span [leading span ]: mid-point Tenkan-sen Kijun-sen plotted ahead 26 periods (including current period) 先行スパン 2 Senkou span B [leading span B]: mid-point highest high lowest low past 52 periods (including current period), plotted ahead 26 periods (including current period) 遅行スパン Chikou span [lagging span]: current period closing price plotted behind 26 periods (including current period) 雲 kumo [cloud] area bounded Senkou span Senkou span B (usually shaded chart).","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"interpretation","dir":"Articles","previous_headings":"Ichimoku Kinko Hyo","what":"Interpretation","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Ichimoku Kinko Hyo can translated ‘one-glance equilibrium chart’. designed allow price action market structure financial securities determined visually ‘--glance’. example strongly upwards-trending market, current candlesticks Tenkan-sen, Kijun-sen, turn cloud, Chikou span may anything . lines cloud represent dynamic support resistance zones relative price candles. Generally, thicker cloud, tougher support/resistance. previous example, price now reverts downwards, can expect support first Tenkan-sen, Kijun-sen finally cloud . price enters cloud, .e. cloud base cloud top, important area gauge whether sufficient momentum price break cloud whether cloud eventually provokes reversal. subtle interpretations involve Chikou span particular action relation cloud lines well candles. outside scope vignette provide full tutorial use Ichimoku Kinko Hyo.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"context","dir":"Articles","previous_headings":"Ichimoku Kinko Hyo","what":"Context","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Ichimoku analysis latest refinement candlestick charting techniques, also originated Japan. Developed 一目山人 Ichimoku, Sanjin, alias 細田吾一 Hosoda, Goichi, work published 1969 seminal 「一目均衡表」 [ichimoku kinkou hyou]. gained popularity Japan especially publication Sasaki’s 「一目均衡表の研究」 [ichimoku kinkouhyou kenkyuu] 1996, now widely-used technical analysis worldwide. ichimoku time periods traditionally calculated 9, 26 52 based manual data analysis performed Japan pre-computer age 6-day working week resulting 26 average trading days month. Although bears little resemblance current day, use time periods persisted ‘accepted practice’. use periods meaningless sense ‘market psychology’ can often create realities, independent fundamentals. However, reason technique evolve, reflect changing trading realities perhaps parameters become relevant collective psychology. reason, length periods can set parameters ‘ichimoku’ package. However please caution note using periods invalidates traditional interpretations Ichimoku Kinko Hyo. Finally, use originated daily candlesticks, valid interpretation remains daily data. However, equally used today shorter, e.g. 4-hour hourly, longer, e.g. weekly monthly, charts.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"a-typical-workflow","dir":"Articles","previous_headings":"","what":"A Typical Workflow","title":"ichimoku: Cloud Charts - The Reference Manual","text":"","code":"library(ichimoku)"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"data","dir":"Articles","previous_headings":"A Typical Workflow","what":"Data","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku works data frames tabular data. ichimoku() function handles input xts, data.frame, data.table, tibble, matrix, data.frame compatible objects. ichimoku incorporates interface OANDA fxTrade API return data major currencies, metals, commodities, government bonds stock indices. Please refer OANDA vignette. ichimoku designed fully pipeable interfaces well R packages return financial data, indeed OANDA functions package :","code":"# ichimoku can create clouds directly from OANDA data, for example: cloud <- ichimoku(oanda(\"USD_JPY\")) # Using R 4.1's new pipe operator: oanda(\"USD_JPY\") |> ichimoku() |> plot() # Or equally using the 'magrittr' pipe: oanda(\"USD_JPY\") %>% ichimoku() %>% plot()"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"input-data-requirements","dir":"Articles","previous_headings":"A Typical Workflow > Data","what":"Input data requirements","title":"ichimoku: Cloud Charts - The Reference Manual","text":"requirement input data minimal: series prices indexed valid timestamps. Date-time index POSIXct format convertible POSIXct column name containing ‘date’, ‘time’ ‘index’, else row names dataset Open/High/Low/Close (OHLC) data always used available. columns names containing ‘open’, ‘high’, ‘low’ ‘close’. searched regular expression patterns column names. details see section data validation HLC price data available, opening price taken closing price previous period. means candlesticks accurate, calculation cloud lines affected Single series price data can also used producing pseudo cloud chart , example, OHLC data available price calculated price VWAP. HLC data found dataset, search proceed single series price data columns names containing ‘price’, ‘value’, ‘close’ pseudo-OHLC series constructed single price. done assigning opening price closing price previous period, high low max min respectively opening closing prices constructed OHLC series contain real high/low values, ichimoku cloud chart calculated way accurate serves approximation Note data retrieval: optimal retrieve data starting back period analysed. certain cloud lines calculated using 52 values plotted ahead 26 periods, hence full chart ichimoku cloud values 78th observation onwards (using default cloud periods). Call ichimoku() full dataset subset data window plotting ensure full cloud entire chart.","code":"# Sample OHLC price data is assigned to data frame 'TKR': TKR <- sample_ohlc_data head(TKR) #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"ichimoku","dir":"Articles","previous_headings":"A Typical Workflow","what":"ichimoku()","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku() main function ichimoku package. takes input data object returns ichimoku object, inherits classes ‘ichimoku’, ‘xts’ ‘zoo’. details, please refer ichimoku object specification. Optional arguments: ticker ticker identify instrument, otherwise set name input object periods [default c(9, 26, 52)] vector defining length periods used cloud. parameter normally modified using values invalid context traditional Ichimoku analysis ... additional arguments, instance ‘holidays’, passed along tradingDays() calculating future cloud daily data keep.data set TRUE retain additional data present input object additional columns /attributes. Note: columns numeric type type coercible numeric preserved, otherwise NAs introduced. returned output designed fit screen; call () display rows entire object. Note , print called setting ‘plot = FALSE’ return data console. default print method ichimoku objects also plots cloud chart graphical device. Use str() compact display object structure: summary method using summary() also provide brief description data: ichimoku object inherits ‘xts’ ‘zoo’ classes, existing methods classes work seamlessly. Please refer section Working ichimoku objects.","code":"cloud <- ichimoku(TKR) print(cloud, plot = FALSE, width = 180) #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB chikou cloudT cloudB #> 2020-01-02 123.0 123.1 122.5 122.7 -1 NA NA NA NA 122.8 NA NA #> 2020-01-03 122.7 122.8 122.6 122.8 1 NA NA NA NA 122.9 NA NA #> 2020-01-06 122.8 123.4 122.4 123.3 1 NA NA NA NA 123.0 NA NA #> 2020-01-07 123.3 124.3 123.3 124.1 1 NA NA NA NA 123.9 NA NA #> 2020-01-08 124.1 124.8 124.0 124.8 1 NA NA NA NA 123.6 NA NA #> 2020-01-09 124.8 125.4 124.5 125.3 1 NA NA NA NA 122.5 NA NA #> 2020-01-10 125.3 125.3 124.8 125.2 -1 NA NA NA NA 122.6 NA NA #> 2020-01-13 125.2 125.3 125.1 125.2 0 NA NA NA NA 123.0 NA NA #> 2020-01-14 125.2 125.2 124.3 124.4 -1 123.90 NA NA NA 123.1 NA NA #> 2020-01-15 124.4 124.5 123.7 123.9 -1 123.90 NA NA NA 122.1 NA NA #> 2020-01-16 123.9 124.4 123.8 124.2 1 123.90 NA NA NA 121.9 NA NA #> 2020-01-17 124.2 124.3 123.0 123.5 -1 124.20 NA NA NA 121.1 NA NA #> 2020-01-20 123.5 123.8 123.1 123.2 -1 124.20 NA NA NA 121.4 NA NA #> 2020-01-21 123.6 123.6 123.4 123.6 0 124.20 NA NA NA 121.5 NA NA #> 2020-01-22 123.5 124.0 123.3 123.5 0 124.15 NA NA NA 121.9 NA NA #> 2020-01-23 123.5 124.5 123.3 124.3 1 124.15 NA NA NA 120.9 NA NA #> 2020-01-24 124.3 124.4 124.0 124.2 -1 124.10 NA NA NA 121.0 NA NA #> 2020-01-27 124.2 124.2 122.7 123.0 -1 123.60 NA NA NA 120.8 NA NA #> 2020-01-28 123.0 123.6 122.7 123.1 1 123.60 NA NA NA 121.2 NA NA #> 2020-01-29 123.1 123.3 123.1 123.2 1 123.60 NA NA NA 121.6 NA NA #> 2020-01-30 123.2 123.2 122.8 123.1 -1 123.60 NA NA NA 121.1 NA NA #> 2020-01-31 123.1 123.5 123.0 123.2 1 123.60 NA NA NA 122.1 NA NA #> 2020-02-03 123.2 123.3 122.6 123.0 -1 123.55 NA NA NA 122.2 NA NA #> 2020-02-04 123.0 123.1 122.6 122.9 -1 123.55 NA NA NA 122.2 NA NA #> 2020-02-05 122.9 123.2 122.6 122.8 -1 123.50 NA NA NA 122.4 NA NA #> 2020-02-06 122.8 122.9 122.8 122.8 0 123.40 123.90 NA NA 122.4 NA NA #> [ reached getOption(\"max.print\") -- omitted 27 rows ] str(cloud) #> ichimoku object [2020-01-02 / 2021-02-01] (281, 12) #> $open $high $low $close $cd $tenkan $kijun $senkouA $senkouB $chikou $cloudT $cloudB #> index: 2020-01-02 ... 2021-02-01 #> attributes: #> periods: 9 26 52 #> periodicity: 1 days #> ticker: TKR summary(cloud) #> ichimoku object with dimensions (281, 12) #> #> Max: 2020-07-13 23:00:00 [139.7] #> Start: 2020-01-02 00:00:00 [123] End: 2020-12-24 00:00:00 [136] #> Min: 2020-05-12 23:00:00 [119.1] #> #> Cloud periods: 9 26 52 #> Periodicity: 1 days #> Ticker: TKR"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"ichimoku-ichimoku","dir":"Articles","previous_headings":"A Typical Workflow > ichimoku()","what":"ichimoku.ichimoku()","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku() may used ichimoku object re-calculate cloud values using price data contained within. ‘ticker’ specified argument, overwrite ticker stored original ichimoku object. Calling ichimoku() ichimoku object containing strategy return ichimoku object original state without strategy unless keep.data = TRUE specified. See strategies vignette information strategies.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"preserving-data","dir":"Articles","previous_headings":"A Typical Workflow > ichimoku()","what":"Preserving Data","title":"ichimoku: Cloud Charts - The Reference Manual","text":"input object may contain additional data required ichimoku analysis, volume etc. retain data ichimoku object, specify keep.data = TRUE calling ichimoku(). consolidates relevant data single object. additional data can now also plotted sub-plot beneath main ichimoku cloud chart (see custom sub-plots). Note: numeric data data coercible numeric type preserved way, types introduce NAs. core data ichimoku object numeric matrix support multiple data types. Custom attributes set input object (timestamp data source) also preserved.","code":"kumo <- ichimoku(TKR, keep.data = TRUE) kumo[, \"volume\"] #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> volume #> 2020-01-02 1875 #> 2020-01-03 1479 #> 2020-01-06 1792 #> 2020-01-07 1977 #> 2020-01-08 2239 #> 2020-01-09 1842 #> 2020-01-10 2548 #> 2020-01-13 2946 #> 2020-01-14 2796 #> 2020-01-15 2879 #> 2020-01-16 2983 #> 2020-01-17 4080 #> 2020-01-20 3584 #> 2020-01-21 2511 #> 2020-01-22 2805 #> 2020-01-23 2853 #> 2020-01-24 2738 #> 2020-01-27 1962 #> 2020-01-28 2795 #> 2020-01-29 2850 #> 2020-01-30 2545 #> 2020-01-31 2608 #> 2020-02-03 2739 #> 2020-02-04 3456 #> 2020-02-05 4037 #> 2020-02-06 4092 #> [ reached getOption(\"max.print\") -- omitted 27 rows ]"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"defining-custom-holidays","dir":"Articles","previous_headings":"A Typical Workflow > ichimoku()","what":"Defining custom holidays","title":"ichimoku: Cloud Charts - The Reference Manual","text":"calculating future cloud daily data, ichimoku() makes call tradingDays() helper function ensure future dates fall trading days (.e. weekends holidays). default, New Year’s Christmas day defined holidays ‘holidays’ argument specified. defaults acceptable general use. define dates non-trading days, vector custom holidays may supplied via ‘holidays’ argument ichimoku() passed tradingDays() function. relevant market trades continuously 24/7 basis, specify ‘holidays = NULL’. bypass logic tradingDays() return dates calculating future cloud.","code":"# Holidays can be specified directly via a vector of dates: ichimoku(TKR, holidays = c(\"2020-01-13\", \"2020-02-11\", \"2020-02-24\")) # Or via a functions that returns a vector of dates (e.g. from the 'timeDate' package): ichimoku(TKR, holidays = timeDate::holidayLONDON()) ichimoku(TKR, holidays = timeDate::holidayNYSE()) # For a market that trades 24/7: ichimoku(TKR, holidays = NULL)"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"working-with-ichimoku-objects","dir":"Articles","previous_headings":"A Typical Workflow > ichimoku()","what":"Working with ichimoku objects","title":"ichimoku: Cloud Charts - The Reference Manual","text":"following generic functions optimised S3 methods ichimoku objects: .data.frame() converting ichimoku object dataframe. Set argument keep.attrs = TRUE retain attributes original ichimoku object index() extract index ichimoku object vector POSIXct values coredata() extract columns ichimoku object numeric matrix shows re-create ichimoku object components: Note specifically ichimoku needs called twice - first convert matrix resulting cbind() operation, recalculate using OHLC data contained within object original data contained NAs. ticker name also set explicitly example. warning issued checking validity POSIX times, case safe ignore POSIXct values ‘index’ simply coerced numeric cbind() operation valid. additional functionality, ‘xts’ package may loaded access wide range methods available ‘xts’ objects, example changing periodicity data.","code":"index <- index(cloud) core <- coredata(cloud) cloud2 <- ichimoku(ichimoku(cbind(index, core), ticker = attr(cloud, \"ticker\"))) #> Warning: Converted numeric values in column 'index' as POSIX times - please #> check validity identical(cloud, cloud2) #> [1] TRUE"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"plot","dir":"Articles","previous_headings":"A Typical Workflow","what":"plot()","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku offers choice 2 visualization systems: static (default) interactive (reactive charts using Shiny).","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"static-plots","dir":"Articles","previous_headings":"A Typical Workflow > plot()","what":"1. Static Plots","title":"ichimoku: Cloud Charts - The Reference Manual","text":"default plot function produces static plots, advantage easily exportable pdf image formats high resolution. Call plot() ichimoku object visualize cloud chart. example demonstrates arguments can supplied customise plot. following arguments customisation shared across plot() iplot(): window (optional) indispensable proper workflow. ichimoku() run larger dataset interest visualization stage data subset window interest. Supply ISO-8601 compatible range string format used ‘xts’ objects, example range ‘2020-02-15/2020-08-15’ ‘2020-02-15/’ (15 Feb 2020) ‘/2020-08’ (end-Aug 2020) simply ‘2020’ select year 2020 ticker (optional) used supply different ticker stored ichimoku object, alternatively longer-form name text appear chart heading subtitle (optional) used specify subtitle display chart title theme [default ‘classic’] choices ‘dark’, ‘mono’, ‘noguchi’, ‘okabe-ito’ ‘solarized’. strat [default TRUE] true, periods strategy results market position shaded (ichimoku object contains strategy) strategy printed chart sustitle (otherwise specified). See strategies vignette information working strategies. type [default ‘none’] type sub-plot display beneath ichimoku cloud chart, choice ‘none’, ‘r’ ‘s’ corresponding oscillator type, ‘bar’ ‘line’ custom plots. custom (optional) character string (containing regular expression) matching column name variable displayed sub-plot. Specify type = 'bar' type = 'line', otherwise type settings take precedence. plot() takes additional parameters follows: ... additional arguments passed along print method ‘ggplot’ objects type = 'none'. plot() also permits user-defined theme, case vector 12 colour values (hex codes names) supplied. colour value corresponds different element chart. example, ‘mono’ theme can specified :","code":"plot(cloud, window = \"2020-05/\", ticker = \"SYM (JSE)\", subtitle = \"Sample Data Series\") c(\"#d9d9d9\", \"#d7d7d7\", \"#d1d1d1\", \"#737373\", \"#1f1f1f\", \"#b8b8b8\", \"#1a1a1a\", \"#1a1a1a\", \"#1a1a1a\", \"#ffffff\", \"#333333\", \"#1a1a1a\")"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"oscillators","dir":"Articles","previous_headings":"A Typical Workflow > plot()","what":"Oscillators","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Although Ichimoku Kinko Hyo considered complete charting system, can times useful pair oscillator. specifying type = \"r\" type = \"s\", corresponding type oscillator shown beneath main ichimoku cloud chart. R-type oscillator based formula Relative Strength Index (RSI). single line indicator look-back window ichimoku object’s medium cloud period (default 26). R-type line calculated 100 - 100 / (1 + [26] period mean open close gain / absolute value [26] period mean open close loss). Note corresponds usual RSI oscillator definition, although identical gains/losses calculated reference period’s open rather previous close. Note also R-type oscillator calculated consistently employ roll-forward mechanism based previous oscillator values like RSI. S-type oscillator based formula stochastic indicator. 2-line indicator fast slow lines look-back windows corresponding fast medium cloud periods respectively (default 9 26). fast line quicker react price changes slow line can used confirmation / divergence. fast S-type line calculated 100 times ratio closing price minus [9] period low [9] period high minus [9] period low. slow S-type line calculated 100 times ratio closing price minus [26] period low [26] period high minus [26] period low. Note difference usual stochastic oscillator definition slow line 3-period moving average fast line.","code":"# To plot an R-type oscillator: plot(cloud, type = \"r\") plot(cloud, window = \"2020-04-01/2020-12-01\", theme = \"solarized\", type = \"s\")"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"custom-sub-plots","dir":"Articles","previous_headings":"A Typical Workflow > plot()","what":"Custom Sub-plots","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Additional data preserved within ichimoku object, example volume data, can plotted sub-plot specifying ‘custom’ argument. character string supplied ‘custom’ regular expression pattern matched column name hence need match exactly, case considered. view custom sub-plot, type must specified either ‘bar’ ‘line’ type setting takes precedence (default ‘none’).","code":"plot(kumo, window = \"2020-04/2020-11\", theme = \"mono\", type = \"bar\", custom = \"volume\")"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"further-options","dir":"Articles","previous_headings":"A Typical Workflow > plot()","what":"Further Options","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Internally, ichimoku’s plot() method wrapper autoplot(). access ggplot2 object, call autoplot() directly plot() returns original ichimoku object (invisibly).","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"interactive-plots","dir":"Articles","previous_headings":"A Typical Workflow > plot()","what":"2. Interactive Plots","title":"ichimoku: Cloud Charts - The Reference Manual","text":"produce interactive plot, use ichimoku’s iplot() function, launches Shiny app. arguments optional full customisation chart can done interactively -app, including selecting time window, theme, chart type, sub-plot etc. cursor infotip provides intuitive access data: hover chart read data values given point time cursor guides provide easy calibration date/time price levels iplot() takes following additional parameters customisation: ... additional parameters passed along ‘options’ argument shiny::shinyApp(). launch.browser [default TRUE] TRUE, system’s default web browser launched automatically app started. value argument can also function call application’s URL. use default Shiny viewer RStudio, specify getOption(\"shiny.launch.browser\").","code":"# For an interactive plot: iplot(cloud)"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"implementation-notes","dir":"Articles","previous_headings":"A Typical Workflow > plot()","what":"Implementation notes","title":"ichimoku: Cloud Charts - The Reference Manual","text":"column names ichimoku object automatically populated drop-menu, selection can made view variable custom sub-plot. Chart type must set either ‘bar’ ‘line’ type setting takes precedence.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"archive","dir":"Articles","previous_headings":"A Typical Workflow","what":"archive()","title":"ichimoku: Cloud Charts - The Reference Manual","text":"completing analysis, resulting objects can stored directly disk. function archive() combines R’s native serialisation capability cryptographic verification data integrity. Archive files created function stored native RData format maximum portability reliability. may read using base R load() function machines without ‘ichimoku’ installed.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"writing","dir":"Articles","previous_headings":"A Typical Workflow > archive()","what":"Writing","title":"ichimoku: Cloud Charts - The Reference Manual","text":"archive() write operations take 2 arguments: object written, file path/name file stored. second argument left empty, system dialog opened allowing file save location set interactively. confirmation printed console file written.","code":"# Write object to file: archive(object, \"path/filename\") # Leave second argument empty to choose file save location from a system dialog: archive(object, )"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"reading","dir":"Articles","previous_headings":"A Typical Workflow > archive()","what":"Reading","title":"ichimoku: Cloud Charts - The Reference Manual","text":"archive() read operations takes single argument: file path/name file read. Alternatively, arguments specified, system dialog opened allowing file chosen interactively. return value function can assigned object. confirmation printed console file read.","code":"# Read from file to object: object <- archive(\"path/filename\") # Choose a file from an interactive system dialog: object <- archive()"},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"data-integrity-verification","dir":"Articles","previous_headings":"A Typical Workflow > archive()","what":"Data Integrity Verification","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Data integrity verification performed SHA256 cryptographic hash algorithm ‘secretbase’ package. archive written, serialised object hashed hash also stored archive. SHA256 hash value printed console confirmation. archive read back, SHA256 hash restored object checked hash original stored archive. identical, ‘data verified’ message printed console along authenticated SHA256 hash.","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"data-validation","dir":"Articles","previous_headings":"Supplementary Information","what":"Data validation","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku performs following data validation steps attempting compute cloud values. Failure step causes ichimoku() halt. Searches column names data object first column containing ‘index’, ‘date’ ‘time’ (case-dependent). found: attempt convert column POSIXct .POSIXct(). fails, check column numeric convert POSIXct assuming numeric value valid unix/POSIX time (warning issued check validity case numeric value valid POSIX time) found: attempt convert row names POSIXct .POSIXct(). fails, check row names integer values just default row names data frames, convert POSIXct assuming numeric value valid unix/POSIX time (warning issued check validity POSIX times constructed way) Note: ‘xts’ objects always indexed valid timestamp ichimoku handles automatically Searches HLC price data columns names containing ‘high’, ‘low’ ‘close’ (case-dependent) respectively found: Searches opening price data column name containing ‘open’ (case-dependent) found sets opening prices closing prices previous period found: Searches single price series columns names containing ‘price’, ‘value’ ‘close’ (case-dependent), pseudo-OHLC series reconstructed Checks dataset longer medium cloud period. case none cloud lines can calculated may however still issues input data prevent cloud values computed, handled explicitly ichimoku(). example, : date-time index headerless column, column name contain ‘index’, ‘date’ ‘time’ (case-dependent). Please rename column ‘index’ cases correct date-time index row names, index ‘xts’ object, also columns contains word ‘index’, ‘date’ ‘time’. Please rename columns serve date-time index correct date-time index can detected one column contains word ‘index’, ‘date’ ‘time’. Please either rename columns serve date-time index, move correct date-time column ahead columns picked first HLC price data contained headerless columns columns labelled, example, ‘Op’, ‘Hi’, ‘Lo’, ‘Cl’. Please rename columns ‘open’, ‘high’, ‘low’ ‘close’ cases NA values within price data. affect algorithm calculating cloud lines window immediately following NA values. Please check data manually correct NA values invoking ichimoku()","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"ichimoku-object-specification","dir":"Articles","previous_headings":"Supplementary Information","what":"ichimoku object specification","title":"ichimoku: Cloud Charts - The Reference Manual","text":"index(object) - date-time index [POSIXct] object$open - opening price $high - high price $low - low price $close - closing price $cd - candle direction (-1 = , 0 = flat, 1 = ) $tenkan - Tenkan-sen $kijun - Kijun-sen $senkouA - Senkou span $senkouB - Senkou span B $chikou - Chikou span $cloudT - cloud Top (max senkouA, senkouB) $cloudB - cloud Base (min senkouA, senkouB) attributes(object)$periods - parameters used calculate cloud [integer vector length 3] $periodicity - periodicity data seconds [numeric] $ticker - instrument identifier [character]","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"since-version-0-x","dir":"Articles","previous_headings":"Supplementary Information > API modifications","what":"Since version 0.x","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku objects created v0.x longer accepted v1.0.0 later package. ensure compatibility ichimoku object specification v1, please upgrade latest package version run ichimoku() previously-created objects re-create according new specification (data preserved)","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"dependencies","dir":"Articles","previous_headings":"","what":"Dependencies","title":"ichimoku: Cloud Charts - The Reference Manual","text":"ichimoku currently following external package dependencies: ggplot2 - graphics visualization shiny - interactive live visualizations xts, zoo - enhanced time series methods mirai - running applications background processes nanonext - interfacing external APIs secretbase - verifying data integrity archived objects RcppSimdJson - parsing data received external APIs Optional (enables additional features): keyring - saving API keys system credential store","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/reference.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"ichimoku: Cloud Charts - The Reference Manual","text":"Sasaki, H. 佐々木 英信 (1996), 一目均衡表の研究 [ichimoku kinkouhyou kenkyuu]. Tokyo, Japan: Toushi Radar.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"multiple ways work Ichimoku Kinko Hyo strategies using ichimoku R package. First foremost visually, functions visualization described reference vignette. However, performing analysis data directly, complications ichimoku system can quickly become apparent. Chikou span particular poses challenge position indicator needs mapped relation chart elements 26 periods previously, however affects trading decisions present point time. ‘strategy layer’ ichimoku package aims prepare data standardized format ease analysis. Short strategy summaries generated automatically, designed serve quick reference rather replacement full backtest using package ‘PerformanceAnalytics’. autostrat() function used facilitate idea generation, leverages computational capability R simultaneously test valid indicator combinations. Risk warning: past results necessarily indicative future performance, always considered within context comprehensive risk analysis framework.","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"use-ichimoku","dir":"Articles","previous_headings":"Working with Strategies","what":"1. Use ichimoku()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"create ichimoku object price data.","code":"# Simulated OHLC pricing data is assigned to data frame 'TKR': TKR <- sample_ohlc_data cloud <- ichimoku(TKR)"},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"a--simple-strategies-using-strat","dir":"Articles","previous_headings":"Working with Strategies","what":"2a. Simple strategies using strat()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"test simple strategy indicator condition form ‘long (short) c1 > c2’. ‘c1’ ‘c2’ quoted column names ichimoku object representing either candlestick values e.g. ‘close’ cloud values e.g. ‘tenkan’. Note: indicator condition remains form c1 > c2 even short trades. Hence please take care, example, inverting ‘long close > tenkan’ ‘short close < tenkan’, actually formulated ‘short tenkan > close’. use strat() returns augmented ichimoku object. printout slice object (rows 100 105) shows following columns appended: $cond: ‘1’ indicator condition met close time period (note: indicator condition involves chikou span, comparison past periods) $posn: ‘1’ represents position held time period (.e. ‘open’ ‘close’) $txn: ‘1’ represents transaction enter new position, ‘-1’ represents transaction exit existing position. transactions assumed happen ‘open’ respective period $logret: log returns ‘open’ price period ‘open’ price next period. avoidance doubt, ‘log returns’ means natural logarithm difference prices $slogret: log returns strategy. simply logret * posn, .e. returns position held $ret: discrete returns ‘open’ price period ‘open’ price next period. avoidance doubt, calculated e raised power ‘logret’ minus 1 $sret: discrete returns strategy. simply ret * posn, .e. returns position held Note: following assumptions apply strategies: confirmation whether condition satisfied received ‘close’ particular period transaction initiated immediately following ‘open’ transactions conducted opening prices events aligned correct time periods, taken ‘open’ ‘close’ inclusive period: ‘cond’ refers condition satisfied ‘close’ period ‘posn’ refers whether position held ‘close’ period ‘txn’ refers transaction period (occurring ‘open’)","code":"strat <- strat(cloud, c1 = \"cloudB\", c2 = \"kijun\") print(strat[100:105, ], plot = FALSE) #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB #> 2020-05-19 23:00:00 122.7 122.7 121.8 122.4 -1 121.05 123.90 125.675 124.85 #> 2020-05-20 23:00:00 122.4 122.6 121.1 121.9 -1 121.05 123.90 125.675 124.85 #> 2020-05-21 23:00:00 121.9 123.7 121.7 123.3 1 121.40 123.80 125.675 124.85 #> 2020-05-24 23:00:00 123.3 124.0 123.0 124.0 1 121.55 123.80 125.675 124.85 #> 2020-05-25 23:00:00 124.2 124.3 124.0 124.1 -1 121.75 123.65 125.975 124.85 #> 2020-05-26 23:00:00 124.1 124.1 123.4 123.9 -1 122.25 123.65 126.475 124.85 #> chikou cloudT cloudB cond posn txn logret #> 2020-05-19 23:00:00 135.1 125.675 124.85 1 1 0 -0.0024479816 #> 2020-05-20 23:00:00 135.6 125.675 124.85 1 1 0 -0.0040933336 #> 2020-05-21 23:00:00 134.5 125.675 124.85 1 1 0 0.0114193737 #> 2020-05-24 23:00:00 134.3 125.675 124.85 1 1 0 0.0072727593 #> 2020-05-25 23:00:00 135.9 125.975 124.85 1 1 0 -0.0008054773 #> 2020-05-26 23:00:00 135.2 126.475 124.85 1 1 0 -0.0016129036 #> slogret ret sret #> 2020-05-19 23:00:00 -0.0024479816 -0.002444988 -0.002444988 #> 2020-05-20 23:00:00 -0.0040933336 -0.004084967 -0.004084967 #> 2020-05-21 23:00:00 0.0114193737 0.011484824 0.011484824 #> 2020-05-24 23:00:00 0.0072727593 0.007299270 0.007299270 #> 2020-05-25 23:00:00 -0.0008054773 -0.000805153 -0.000805153 #> 2020-05-26 23:00:00 -0.0016129036 -0.001611604 -0.001611604"},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"b--complex-strategies-using-strat","dir":"Articles","previous_headings":"Working with Strategies","what":"2b. Complex strategies using strat()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"Complex strategies can created strat() simply supplying ‘c3’ ‘c4’ function. quoted column names ichimoku object form second part indicator condition. create desired complex strategy, argument ‘type’ must also specified. default set 2, means strategy combined strategy formulated ‘c1 > c2 & c3 > c4’, conditions must satisfied. ‘type’ set 3, strategy formulated asymmetric strategy ‘c1 > c2 x c3 > c4’, ‘c1 > c2’ used position entry indicator, ‘c3 > c4’ position exit indicator. Note: strategy , example, ‘close > tenkan x tenkan > close’, equivalent simple strategy ‘close > tenkan’ identical due strict inequality. former, situation ‘close = tenkan’ trigger position exit latter ","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"view-strategy-summary-with-summary","dir":"Articles","previous_headings":"Working with Strategies","what":"3. View strategy summary with summary()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"summary strategy saved attribute ichimoku object can accessed summary() method ichimoku objects. summary designed provide quick overview whether strategy effective / desirable: Strategy returns compared benchmark, simply holidng position throughout period Comparing returns combined total periods market can help determine strategy substantially different just taking market risk Total trades along average trade length can used filter undesirable strategies -trade Trade success % helps characterise consistency strategy whether relies small percentage outsize returns return worst-performing trade provides measure downside risk See strategy summary specification details reported measures.","code":"summary(strat) #> [,1] #> Strategy \"cloudB > kijun\" #> --------------------- \"----------\" #> Strategy cuml return % 14.09 #> Per period mean ret % 0.0741 #> Periods in market 46 #> Total trades 3 #> Average trade length 15.33 #> Trade success % 100 #> Worst trade ret % 3.4 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"visualize-by-calling-plot-or-iplot-","dir":"Articles","previous_headings":"Working with Strategies","what":"4. Visualize by calling plot() or iplot().","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"periods strategy results market position now shaded ichimoku cloud chart. strategy also printed chart subtitle (otherwise specified). view original chart without strategy, simply pass argument strat = FALSE calling plot() iplot().","code":"plot(strat, theme = \"dark\")"},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"combine-strategies-using-stratcombine","dir":"Articles","previous_headings":"Working with Strategies","what":"5. Combine strategies using stratcombine()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"stratcombine() can used create custom combined strategies existing strategies contained ichimoku objects ‘s1’ ‘s2’ form ‘s1 & s2’. Note: rather combining simple strategies using stratcombine(), preferable supply 4 arguments ‘c1’, ‘c2’, ‘c3’, ‘c4’ directly strat() generate strategy ‘c1 > c2 & c3 > c4’.","code":"strat2 <- strat(cloud, \"kijun\", \"tenkan\") newstrat <- stratcombine(strat, strat2) summary(newstrat) #> [,1] #> Strategy \"cloudB > kijun & kijun > tenkan\" #> --------------------- \"----------\" #> Strategy cuml return % 11.53 #> Per period mean ret % 0.0613 #> Periods in market 27 #> Total trades 3 #> Average trade length 9 #> Trade success % 100 #> Worst trade ret % 1.78 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"further-backtesting-and-returns-analysis","dir":"Articles","previous_headings":"Working with Strategies","what":"6. Further backtesting and returns analysis","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"strategy returns saved within ichimoku object columns ‘slogret’ (strategy log returns) ‘sret’ (strategy discrete returns). benchmark returns periods saved ‘logret’ (log returns) ‘ret’ (discrete returns). ichimoku object inherits ‘xts’ class, columns may fed directly econometrics time series analysis packages ‘PerformanceAnalytics’, per example .","code":"library(PerformanceAnalytics) # To chart performance comparison of strategy vs benchmark, daily returns and drawdowns charts.PerformanceSummary(strat[, c(\"sret\", \"ret\")]) # For a table detailing drawdowns, including depth, length of recovery etc. table.Drawdowns(strat[, \"sret\"])"},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"autostrat","dir":"Articles","previous_headings":"Advanced Strategies and ML","what":"autostrat()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"analytic capability R can leveraged generate evaluate possible strategies. function designed simplicity can called ichimoku object without additional arguments. optional arguments take limited : n [default 8] number strategies return dir [default ‘long’] trade direction ‘long’ ‘short’ level [default 1] return simple strategies. complex strategies, set level = 2 return combined strategies form ‘s1 & s2’ level = 3 return asymmetric strategies form ‘s1 x s2’ quietly set TRUE, suppress printing additional output console return quietly output autostrat() list ichimoku objects. object may accessed position list e.g. [[1]] first object. metadata also saved attributes list can accessed function look(): logret: log returns combinations computed autostrat summary: strategy summaries Note: strategies returned may order strategy returns displayed strategy summaries. due fact implementation via mlgrid() simultaneously tests strategies using time interval comparability. However individual strategies run top ‘n’ strategies using available data indicators, may used comparison. Note: SenkouA, SenkouB, cloudT cloudB used conjunction indicators, possible get series similar returns cloudB > close, senkouB > close etc. Although strategies may times equivalent considered equivalent, always case results returned.","code":"autostrat(cloud, n = 3) #> [,1] [,2] #> Strategy \"senkouB > tenkan\" \"cloudB > tenkan\" #> --------------------- \"----------\" \"----------\" #> Strategy cuml return % 17.49 16.08 #> Per period mean ret % 0.0906 0.0838 #> Periods in market 63 51 #> Total trades 3 3 #> Average trade length 21 17 #> Trade success % 100 100 #> Worst trade ret % 3.64 3.16 #> --------------------- \"----------\" \"----------\" #> Benchmark cuml ret % 5.53 5.53 #> Per period mean ret % 0.0302 0.0302 #> Periods in market 178 178 #> --------------------- \"----------\" \"----------\" #> Direction \"long\" \"long\" #> Start 2020-04-19 23:00:00 2020-04-19 23:00:00 #> End 2020-12-23 2020-12-23 #> Ticker \"TKR\" \"TKR\" #> [,3] #> Strategy \"senkouB > kijun\" #> --------------------- \"----------\" #> Strategy cuml return % 14.1 #> Per period mean ret % 0.0741 #> Periods in market 64 #> Total trades 3 #> Average trade length 21.33 #> Trade success % 100 #> Worst trade ret % 3.49 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"autostrat-levels-2-and-3","dir":"Articles","previous_headings":"Advanced Strategies and ML","what":"autostrat() Levels 2 and 3","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"Set argument level = 2 autostrat() test strategies combination 2 indicator conditions, .e. strat() type = 2. Set argument level = 3 autostrat() test strategies using asymmetric combination 2 indicator conditions, .e. strat() type = 3. Note level 3 autostrat considered somewhat experimental results tend higher sensitivity data particular starting conditions.","code":"autostrat(cloud, n = 3, dir = \"short\", level = \"2\") #> [,1] #> Strategy \"close > chikou & tenkan > senkouB\" #> --------------------- \"----------\" #> Strategy cuml return % 11.21 #> Per period mean ret % 0.0597 #> Periods in market 20 #> Total trades 4 #> Average trade length 5 #> Trade success % 75 #> Worst trade ret % -0.44 #> --------------------- \"----------\" #> Benchmark cuml ret % -5.24 #> Per period mean ret % -0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"short\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> [,2] #> Strategy \"high > chikou & tenkan > senkouB\" #> --------------------- \"----------\" #> Strategy cuml return % 11.05 #> Per period mean ret % 0.0589 #> Periods in market 22 #> Total trades 4 #> Average trade length 5.5 #> Trade success % 75 #> Worst trade ret % 0 #> --------------------- \"----------\" #> Benchmark cuml ret % -5.24 #> Per period mean ret % -0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"short\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> [,3] #> Strategy \"close > chikou & tenkan > cloudB\" #> --------------------- \"----------\" #> Strategy cuml return % 10.69 #> Per period mean ret % 0.0571 #> Periods in market 24 #> Total trades 4 #> Average trade length 6 #> Trade success % 75 #> Worst trade ret % -0.44 #> --------------------- \"----------\" #> Benchmark cuml ret % -5.24 #> Per period mean ret % -0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"short\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" autostrat(cloud, n = 3, dir = \"long\", level = \"3\") #> [,1] #> Strategy \"senkouB > senkouA x kijun > low\" #> --------------------- \"----------\" #> Strategy cuml return % 2.49 #> Per period mean ret % 0.0138 #> Periods in market 59 #> Total trades 3 #> Average trade length 19.67 #> Trade success % 66.67 #> Worst trade ret % -2.49 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> [,2] #> Strategy \"senkouB > senkouA x tenkan > kijun\" #> --------------------- \"----------\" #> Strategy cuml return % 6.98 #> Per period mean ret % 0.0379 #> Periods in market 82 #> Total trades 3 #> Average trade length 27.33 #> Trade success % 100 #> Worst trade ret % 1.09 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> [,3] #> Strategy \"senkouB > high x cloudT > close\" #> --------------------- \"----------\" #> Strategy cuml return % 21.04 #> Per period mean ret % 0.1074 #> Periods in market 130 #> Total trades 4 #> Average trade length 32.5 #> Trade success % 75 #> Worst trade ret % -0.38 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"mlgrid","dir":"Articles","previous_headings":"Advanced Strategies and ML","what":"mlgrid()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"ML layer provides tools developing quantitative ichimoku solutions. mlgrid() generates numeric representation relationship ichimoku cloud chart elements, represent set stationary price features. purpose provide base grid machine learning workflows. returned object data.frame matrix ‘tidy’ format one observation per row one feature per column target ‘y’ first column. mlgrid() used power autostrat() relative() functions. 3 basic types grid shown . ‘boolean’ produces ‘1’ ‘0’ depending whether condition c1_c2 (read c1 > c2) met: ‘numeric’ produces numeric difference c1 - c2: ‘z-score’ produces standard score ‘numeric’ type grid: Note: valid combinations included within grid. combination involving ‘open’ excluded effect lagged indicator contemporaneous. following trivial highly-collinear pairs also excluded: {high, close} ,{low, close}, {low, high}, {cloudT, senkouA}, {cloudB, senkouA}, {cloudT, senkouB}, {cloudB, senkouB}, {cloudB, cloudT}. parameter ‘unique’ defaults TRUE return unique combinations c1 c2, can also set FALSE return c1 > c2 c2 > c1 situation merits. ‘y’ column can switched log discrete returns. date-time index corresponds condition met close period. return single-period return achieved transacting immediately following opening price next opening price. sense, time periods strictly match, nevertheless correctly paired. calculation returns correct pairing effectively uses 2 periods, hence order obtain grid latest available price data, y must set ‘none’, case grid returned without target variable.","code":"mlgrid(cloud, y = \"logret\", dir = \"long\", type = \"boolean\", unique = TRUE)[100:105, 1:4] #> y chikou_close chikou_high chikou_low #> 2020-10-07 23:00:00 0.0083050685 1 1 1 #> 2020-10-08 23:00:00 0.0015026299 1 1 1 #> 2020-10-11 23:00:00 0.0022497197 1 1 1 #> 2020-10-12 23:00:00 -0.0014992507 1 1 1 #> 2020-10-13 23:00:00 -0.0007504691 1 1 1 #> 2020-10-14 23:00:00 0.0037467260 1 1 1 mlgrid(cloud, y = \"ret\", dir = \"short\", type = \"numeric\", unique = FALSE)[100:105, 1:4] #> y chikou_close chikou_high chikou_low #> 2020-10-07 23:00:00 -0.0082706767 3.9 3.8 4.4 #> 2020-10-08 23:00:00 -0.0015015015 5.3 4.6 6.0 #> 2020-10-11 23:00:00 -0.0022471910 3.5 2.9 5.6 #> 2020-10-12 23:00:00 0.0015003751 5.0 3.7 6.4 #> 2020-10-13 23:00:00 0.0007507508 5.1 4.0 6.0 #> 2020-10-14 23:00:00 -0.0037397158 6.7 5.0 7.1 mlgrid(cloud, y = \"ret\", dir = \"short\", type = \"z-score\", unique = FALSE)[100:105, 1:4] #> y chikou_close chikou_high chikou_low #> 2020-10-07 23:00:00 -0.0082706767 0.4046813 0.5057896 0.3499295 #> 2020-10-08 23:00:00 -0.0015015015 0.6349143 0.6370076 0.6106195 #> 2020-10-11 23:00:00 -0.0022471910 0.3389004 0.3581693 0.5454470 #> 2020-10-12 23:00:00 0.0015003751 0.5855786 0.4893873 0.6757920 #> 2020-10-13 23:00:00 0.0007507508 0.6020238 0.5385941 0.6106195 #> 2020-10-14 23:00:00 -0.0037397158 0.8651473 0.7026165 0.7898439"},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"relative","dir":"Articles","previous_headings":"Advanced Strategies and ML","what":"relative()","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"Produces statistical summary latest numeric representation ichimoku cloud chart relative historical values contained within ichimoku object. can aid determining whether current trading falls within outside normal ranges. Takes following optional arguments: order [default FALSE] set TRUE order results absolute ‘z-score’. highest values listed first signif [default 0.2] set significance threshold ‘p’ equal lower, element starred ’*’. Note: value may freely set default 0.2 arbitrary special significance quietly set TRUE, suppress printing additional output console return quietly ‘mean(X)’ mean value element X, ‘sd(X)’ standard deviation, ‘X[n]’ nth latest observed values. ‘res’ residual X[n] - mean(X) represents centred measure deviation latest observed value. ‘z-score’ (standard score) calculated res / sd(X) centred scaled measure deviation latest observed value. ‘p >= |z|’ represents empirical probability latest observed absolute ‘z-score’ greater. ’p*’ display star ‘p >= |z|’ less equal value argument ‘signif’. ‘E(|res|)|p’ represents mean expected absolute value ‘res’, conditional upon absolute ‘z-score’ greater equal latest observed absolute ‘z-score’. provides indication much ‘res’ might increase extreme cases.","code":"relative(cloud, signif = 0.4)[1:10, ] #> Latest: 2020-12-24 00:00:00 | n: 155 #> mean(X) sd(X) X[n] res z-score p >= |z| p* E(|res|)|p #> chikou_close 1.51 6.07 7.00 5.49 0.91 0.39 * 8.53 #> chikou_high 0.79 6.09 6.60 5.81 0.95 0.36 * 8.91 #> chikou_low 2.31 6.12 7.80 5.49 0.90 0.41 8.40 #> chikou_tenkan 1.73 6.15 6.90 5.17 0.84 0.41 8.70 #> chikou_kijun 2.28 5.96 4.90 2.62 0.44 0.63 6.84 #> chikou_senkouA 3.44 6.46 4.75 1.31 0.20 0.89 6.26 #> chikou_senkouB 4.26 5.40 4.35 0.09 0.02 1.00 4.76 #> chikou_cloudT 2.67 6.44 4.35 1.68 0.26 0.84 6.59 #> chikou_cloudB 5.03 5.20 4.75 -0.28 -0.05 0.99 4.60 #> close_tenkan 0.52 1.77 1.70 1.18 0.67 0.52 2.19"},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"strategy-summary-specification","dir":"Articles","previous_headings":"","what":"Strategy Summary Specification","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"--- Strategy cuml return %: (discrete) percentage return achieved pursuing strategy, assuming returns compounded. measure equivalent sum log returns converted back discrete return Per period mean ret %: percentage return () divided periods market () Periods market: number periods (days, whatever periodicity data ) market Total trades: Total number trades implement strategy. Note trade requires 2 transactions, one enter trade one exit. Note: generating benchmark return imply one trade Average trade length: Periods Market () divided total trades () Trade success %: Number trades return strictly greater zero divided total number trades Worst trade ret %: (discrete) percentage return worst-performing trade --- Benchmark cuml return %: (discrete) percentage return achieved using ‘buy hold’ strategy Per period mean ret %: percentage return () divided periods market () Periods market: number periods (days, whatever periodicity data ) ‘start’ ‘end’ dates --- Ticker: ticker saved ichimoku object Start/end: start end dates backtest. dates differ different cloud lines depending many periods takes calculate Direction: ‘long’ ‘short’ trade direction can set via argument ‘dir’. single direction strategies considered","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/strategies.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"ichimoku: Beyond Visualization - Quantitative Strategies","text":"Sasaki, H. 佐々木 英信 (1996), 一目均衡表の研究 [ichimoku kinkouhyou kenkyuu]. Tokyo, Japan: Toushi Radar.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"ichimoku: Auxiliary Functions","text":"vignette dedicated auxiliary functions exported ichimoku package. Note auxiliary functions programmed performance hence stripped superfluous validation error-checking code. used outside intended scopes errors may expected. particular, input types must match exactly.","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"tradingdays","dir":"Articles","previous_headings":"Core Auxiliary Functions","what":"tradingDays()","title":"ichimoku: Auxiliary Functions","text":"Used subset vector dates trading days. Note: argument ‘holidays’ passed ichimoku(), passed function calculating dates future cloud. Takes following arguments: x vector POSIXct dates. holidays (optional) vector, function outputs vector, dates defined holidays. Set NULL continuously-traded market. specified, New Year’s Christmas day defined holidays default. ... arguments used function.","code":"dates <- seq(from = as.POSIXct(\"2020-01-01\"), by = \"1 day\", length.out = 7) dates #> [1] \"2020-01-01 UTC\" \"2020-01-02 UTC\" \"2020-01-03 UTC\" \"2020-01-04 UTC\" #> [5] \"2020-01-05 UTC\" \"2020-01-06 UTC\" \"2020-01-07 UTC\" tradingDays(dates) #> [1] FALSE TRUE TRUE FALSE FALSE TRUE TRUE tradingDays(dates, holidays = c(\"2020-01-02\", \"2020-01-03\")) #> [1] TRUE FALSE FALSE FALSE FALSE TRUE TRUE tradingDays(dates, holidays = NULL) #> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE"},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"look","dir":"Articles","previous_headings":"Core Auxiliary Functions","what":"look()","title":"ichimoku: Auxiliary Functions","text":"Can used inspect informational attributes R objects. Takes object optional argument. Called without argument, .Last.value used instead. objects created ichimoku package, list attributes specific data type returned. objects, list attributes non-standard matrix / data.frame / xts objects returned, else invisible NULL none present.","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") look(cloud) #> $periods #> [1] 9 26 52 #> #> $periodicity #> [1] 86400 #> #> $ticker #> [1] \"TKR\" strat <- strat(cloud) look(strat) #> $periods #> [1] 9 26 52 #> #> $periodicity #> [1] 86400 #> #> $ticker #> [1] \"TKR\" #> #> $strat #> [,1] #> Strategy \"close > tenkan\" #> --------------------- \"----------\" #> Strategy cuml return % 8.57 #> Per period mean ret % 0.0334 #> Periods in market 138 #> Total trades 20 #> Average trade length 6.9 #> Trade success % 35 #> Worst trade ret % -2.54 #> --------------------- \"----------\" #> Benchmark cuml ret % 9 #> Per period mean ret % 0.035 #> Periods in market 246 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-01-15 #> End 2020-12-23 #> Ticker \"TKR\" grid <- mlgrid(cloud) look(grid) #> $y #> [1] \"logret\" #> #> $k #> [1] 1 #> #> $direction #> [1] \"long\" #> #> $type #> [1] \"boolean\" #> #> $ticker #> [1] \"TKR\" #> #> $means #> [1] NA #> #> $sdevs #> [1] NA"},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"xts_df","dir":"Articles","previous_headings":"Dataframe Constructors","what":"xts_df()","title":"ichimoku: Auxiliary Functions","text":"Convert ‘xts’ object ‘data.frame’. function can order magnitude faster .data.frame() ‘xts’ object. Note ichimoku objects, slightly faster, specific version implemented S3 method .data.frame(). Hence using utility ichimoku object necessary. Takes following arguments: x ‘xts’ object convert ‘data.frame’. keep.attrs (optional) set TRUE, preserve custom attributes set original object.","code":"cloud <- ichimoku(sample_ohlc_data) df <- xts_df(cloud) str(df) #> 'data.frame': 281 obs. of 13 variables: #> $ index : POSIXct, format: \"2020-01-02 00:00:00\" \"2020-01-03 00:00:00\" ... #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... # Preserving custom attributes: df2 <- xts_df(cloud, keep.attrs = TRUE) str(df2) #> 'data.frame': 281 obs. of 13 variables: #> $ index : POSIXct, format: \"2020-01-02 00:00:00\" \"2020-01-03 00:00:00\" ... #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... #> - attr(*, \"periods\")= int [1:3] 9 26 52 #> - attr(*, \"periodicity\")= num 86400 #> - attr(*, \"ticker\")= chr \"sample_ohlc_data\""},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"matrix_df","dir":"Articles","previous_headings":"Dataframe Constructors","what":"matrix_df()","title":"ichimoku: Auxiliary Functions","text":"Convert matrix ‘data.frame’. function can twice fast .data.frame() matrix. Takes following arguments: x matrix convert ‘data.frame’. keep.attrs (optional) set TRUE, preserve custom attributes set original object.","code":"cloud <- ichimoku(sample_ohlc_data) mcloud <- as.matrix(cloud) df <- matrix_df(mcloud) str(df) #> 'data.frame': 281 obs. of 12 variables: #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... str(row.names(df)) #> chr [1:281] \"2020-01-02\" \"2020-01-03\" \"2020-01-06\" \"2020-01-07\" ..."},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"df_merge","dir":"Articles","previous_headings":"Dataframe Utilities","what":"df_merge()","title":"ichimoku: Auxiliary Functions","text":"Full join arbitrary number ‘data.frame’ objects passed arguments, preserving unique entries. Can used combine historical time series data observation indexed unique timestamp periods complete. Takes arbitrary number arguments: ... data.frame objects combine. Can used join price dataframes retrieved oanda(). function designed join complete historical data. data merged contains data incomplete periods, entries preserved rather updated. incomplete periods detected within data, warning issued, resulting dataframe manually inspected case contains unwanted duplicates. Use df_append() updating dataframes new values.","code":"data1 <- sample_ohlc_data[1:6, ] data1 #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 data2 <- sample_ohlc_data[4:10, ] data2 #> time open high low close volume #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879 df_merge(data1, data2) #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879"},{"path":"https://shikokuchuo.net/ichimoku/articles/utilities.html","id":"df_append","dir":"Articles","previous_headings":"Dataframe Utilities","what":"df_append()","title":"ichimoku: Auxiliary Functions","text":"Update ‘data.frame’ object new data. Can used append new updated time series data existing dataframe, observation indexed unique timestamp/identifier key column. Takes 4 arguments: old data.frame object containing existing data. new data.frame object containing new data. key [default ‘time’] column name used key provided character string. keep.attr [default ‘timestamp’] name attribute ‘new’ retain, present, provided character string. Can used update price dataframes retrieved oanda(). function designed update existing data new values become available. opposed df_merge(), data ‘new’ overwrite data ‘old’ rather create duplicates. attribute specified ‘keep.attr’ present ‘new’, example ‘timestamp’ pricing data returned oanda(), retained. attribute found ‘new’, argument effect. custom attributes dropped.","code":"data1 <- sample_ohlc_data[1:8, ] data1 #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 data2 <- sample_ohlc_data[7:10, ] data2 #> time open high low close volume #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879 df_append(data1, data2) #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"about-oanda-fxtrade","dir":"Articles","previous_headings":"","what":"About OANDA fxTrade","title":"ichimoku: The OANDA fxTrade API","text":"ichimoku provides R language interface OANDA fxTrade API. OANDA primary source foreign exchange data used investors, corporations governments globally. API can used retrieving historical live streaming price data major currencies, metals, commodities, government bonds stock indices. example available financial data: OHLC prices major forex pairs can obtained start 2005 granularity ranging 5 seconds monthly. total list 120 covered instruments please refer Available Instruments section . Please note ‘OANDA’ ‘fxTrade’ trademarks owned OANDA Corporation, entity unaffiliated ichimoku package, authors copyright holders.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"registering-with-oanda","dir":"Articles","previous_headings":"","what":"Registering with OANDA","title":"ichimoku: The OANDA fxTrade API","text":"OANDA fxTrade API, distinct OANDA data sources, based upon retail / professional trading offering name. , access API requires fxTrade account OANDA agreement API terms use. Registering ‘demo’ ‘practice’ account entirely free time writing provides full access API. registering account, following URL may used: https://www.oanda.com/forex-trading/. successful registration, link can found OANDA fxTrade account profile page ‘Manage API Access’ (Account -> Services -> Manage API Access). , personal access token use OANDA API can generated, well revoked. access token enable OANDA functions package.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"setting-your-oanda-api-key","dir":"Articles","previous_headings":"","what":"Setting your OANDA API Key","title":"ichimoku: The OANDA fxTrade API","text":"‘keyring’ package installed, OANDA API key (personal access token) can set saved system credential store using oanda_set_key(). enable retrieved automatically subsequent sessions. Separate keys can set practice live accounts; please choose correct account type prompted. access token revoked re-generated, please remember set API key oanda_set_key() function. alternative, package looks environment variable OANDA_API_KEY. present, taken OANDA API key, irrespective type account, precedence keys stored using ‘keyring’.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"using-a-live-account","dir":"Articles","previous_headings":"","what":"Using a Live Account","title":"ichimoku: The OANDA fxTrade API","text":"using access token live (real money) account, want call oanda_switch() beginning session; switches default server practice server live server. Settings persist end session. Note: package contains functions retrieving available instruments price data. contain code implement trading capability whatsoever. Please aware however, personal access token can used (outside package) operations account including placing orders trades, appropriate precautions taken using live account token.","code":"library(ichimoku) oanda_switch() #> Default OANDA server switched to 'live'"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"the-oanda-functions","dir":"Articles","previous_headings":"","what":"The OANDA Functions","title":"ichimoku: The OANDA fxTrade API","text":"OANDA functions package prefixed ‘oanda’ clarity. Functions may called interactively without arguments, e.g. oanda_stream() oanda_view(), case prompted enter required arguments; opposed specifying arguments normally, entered unquoted .e. without surrounding ““. functions, ‘instrument’ argument case-insensitive delimiter can either ’_’ ‘-’, oanda(\"USD_JPY\") oanda(\"usd-jpy\") acceptable.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda()","title":"ichimoku: The OANDA fxTrade API","text":"Retrieve pricing data OANDA fxTrade API. arguments function phrased identically API relevant: instrument string containing base currency quote currency delimited ’_’ ‘-’ (e.g. “USD_JPY” “usd-jpy”). Use oanda_instruments() function return list valid instruments granularity [default “D”] granularity price data fetch, one “M”, “W”, “D”, “H12”, “H8”, “H6”, “H4”, “H3”, “H2”, “H1”, “M30”, “M15”, “M10”, “M5”, “M4”, “M2”, “M1”, “S30”, “S15”, “S10”, “S5” count (optional) number periods return. API supports maximum 5000 individual request, defaults 500 specified. ‘’ ‘’ specified, ‘count’ ignored, time range combined ‘granularity’ determine number periods return (optional) start time range fetch price data, example “2020-02-01” (optional) end time range fetch price data, example “2020-06-30” price [default “M”] pricing component, one “M” (midpoint), “B” (bid) “” (ask) server (optional) Specify “practice” “live” server according account type held OANDA. specified, default “practice”, unless changed oanda_switch() apikey (optional) string containing OANDA fxTrade API key (personal access token). need specified already stored environment variable ‘OANDA_API_KEY’ oanda_set_key(). argument designed specifying function returns string rather string , potentially unsecure. allows packages provide secure storage secrets used preferred ‘keyring’ quietly set TRUE, suppress printing output console return quietly Note: specified request result 5000 periods returned, function prompts user confirm multiple requests submitted. Unless user response “n” “”, data proceed downloaded batches merged together single dataframe. function safe use non-interactive settings cases download proceed automatically without prompting. returned object dataframe following columns: ‘time’, ‘open’, ‘high’, ‘low’, ‘close’, ‘volume’ ‘complete’. volume used caution reflects trading volume registered OANDA may reflective broader market complete indicates whether data period complete . TRUE, values historical subject change. FALSE, period ongoing values reflect current snapshot whilst final values may may differ Important implementation notes: Incorporates automatic adjustment timestamps end period, customary financial data. means , example, today’s pricing data (incomplete trading period) today’s date expected. contrast, raw data API timestamp start period API data sometimes includes data non-trading days low volumes. common older data less recent data. may represent OTC trades occurred OANDA platform, nevertheless reflect market rates. automatically excluded data returned otherwise produce spurious results used ichimoku()","code":"oanda(\"USD_JPY\", count = 3, from = \"2010-11-01\", price = \"B\") #> time open high low close volume complete #> 1 2010-11-01 21:00:00 80.275 81.504 80.225 80.501 22291 TRUE #> 2 2010-11-02 21:00:00 80.504 80.956 80.460 80.617 13795 TRUE #> 3 2010-11-03 21:00:00 80.632 81.585 80.594 81.069 22204 TRUE"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda_chart","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda_chart()","title":"ichimoku: The OANDA fxTrade API","text":"Create updating real-time Ichimoku cloud chart. refresh rate can set chart updated every second. plot ichimoku chart price data requested output graphical device refresh interval. arguments identical oanda() addition : refresh [default 5] set refresh rate chart seconds, minimum 1 limit (optional) specify time seconds limit session. session end data returned automatically specified time elapsed ... additional parameters passed onto ichimoku() calculating ichimoku cloud autoplot() set chart parameters periods [default c(9L, 26L, 52L)] vector defining length periods used cloud. parameter normally modified using values invalid context traditional Ichimoku analysis arguments ‘’ ‘’ excluded relevant context. RStudio, please switch plots plane view chart already focus. Note periods displayed chart fewer ‘count’ specified - using default cloud periods, first 77 datapoints excluded. design ensure full cloud displayed (.e. missing values cloud lines start data). Please take account setting ‘count’ parameter. exit function, ichimoku object underlying chart returned (invisibly). allows data saved simply assigning object.","code":"# For a live Palladium price chart: oanda_chart(\"XPD_USD\") # To access the data, simply assign the return value to an object: cloud <- oanda_chart(\"XPD_USD\")"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda_studio","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda_studio()","title":"ichimoku: The OANDA fxTrade API","text":"Create interactive R Shiny session working real-time Ichimoku cloud charts. Provides live analysis environment parameters may set interactively required. cursor infotip provides ready access data directly chart. parameters can set interactively -app, oanda_studio() may called without specifying arguments. Otherwise, parameters may set beforehand way oanda_chart(). following additional parameters can used customise behaviour Shiny environment: new.process [default FALSE] TRUE, start shiny session new R process, unblocking current process allowing continued use R console. ... additional arguments passed ichimoku() calculating ichimoku cloud, autoplot() set chart parameters, ‘options’ argument shiny::shinyApp() launch.browser [default TRUE] TRUE, system’s default web browser launched automatically app started. value argument can also function call application’s URL. use default Shiny viewer RStudio, please specify getOption(\"shiny.launch.browser\")","code":"oanda_studio()"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"downloading-data","dir":"Articles","previous_headings":"The OANDA Functions > oanda_studio()","what":"Downloading Data","title":"ichimoku: The OANDA fxTrade API","text":"ichimoku object underlying live cloud chart can saved selecting Data Archive button. button uses archive() save ichimoku object disk. filename form: instrument_granularity_price.rda, e.g. SUGAR_USD_D_A.rda. confirmed, file saved browser’s default download location. Note files name overwritten instead filename made unique. read back file, use archive():","code":"# Supply the quoted file path / name, for example: cloud <- archive(\"~/Downloads/SUGAR_USD_D_A.rda\") # Or alternatively, choose the saved file interactively using a system dialog: cloud <- archive()"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda_stream","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda_stream()","title":"ichimoku: The OANDA fxTrade API","text":"Connect OANDA fxTrade streaming API stream list prices generated OANDA. arguments follows: instrument instrument stream data display [default 8L] specify integer customise number rows display console one time limit (optional) specify time seconds limit streaming session. session end data returned automatically specified time elapsed ‘server’ ‘apikey’ arguments also available required. Use ‘Esc’ key stop stream return session data. Assign return value object wish retain data. Note: messages type ‘PRICE’ processed. Messages type ‘HEARTBEAT’ consisting timestamp discarded. following noted streaming API documentation: Pricing stream include every single price created Account 4 prices sent per second (every 250 milliseconds) instrument one price created 250 millisecond window, price effect end window sent means periods rapid price movement, every price sent Pricing windows different connections stream aligned way (e.g. top second) means periods rapid price movement, different prices may observed depending alignment connection","code":"# Streaming session will end with data automatically returned after 600 secs (10 mins): data <- oanda_stream(\"UK10YB_GBP\", limit = 600) #> Streaming data... Press 'Esc' to return #> time bids asks closeoutBid closeoutAsk status tradeable instrument #> 1 2022-11-15 11:04:00 105.049, 10000 105.079, 10000 105.049 105.079 tradeable TRUE UK10YB_GBP #> 2 2022-11-15 11:04:01 105.039, 10000 105.079, 10000 105.039 105.079 tradeable TRUE UK10YB_GBP #> 3 2022-11-15 11:04:01 105.049, 10000 105.079, 10000 105.049 105.079 tradeable TRUE UK10YB_GBP #> 4 2022-11-15 11:04:04 105.059, 10000 105.089, 10000 105.059 105.089 tradeable TRUE UK10YB_GBP #> 5 2022-11-15 11:04:10 105.059, 10000 105.089, 10000 105.059 105.089 tradeable TRUE UK10YB_GBP #> 6 2022-11-15 11:04:11 105.059, 10000 105.089, 10000 105.059 105.089 tradeable TRUE UK10YB_GBP #> 7 2022-11-15 11:04:15 105.049, 10000 105.089, 10000 105.049 105.089 tradeable TRUE UK10YB_GBP #> 8 2022-11-15 11:04:15 105.049, 10000 105.079, 10000 105.049 105.079 tradeable TRUE UK10YB_GBP"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda_quote","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda_quote()","title":"ichimoku: The OANDA fxTrade API","text":"convenience function outputs console latest one-line price quote instrument. output format follows: instrument, timestamp, daily open, high, low last prices, daily percentage change (open), pricing component (M mid, B bid, ask).","code":"oanda_quote(\"USD_JPY\") #> USD_JPY 2021-10-05 16:29:44 open: 110.931 high: 111.564 low: 110.871 last: 111.398 %chg: 0.421 M"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda_view","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda_view()","title":"ichimoku: The OANDA fxTrade API","text":"Prints snapshot overview selected market, showing relative performance constituents. available markets : ‘allfx’ available currencies, ‘bonds’ government bonds, ‘commodities’ commodities, ‘fx’ major currency pairs, ‘metals’ metals ‘stocks’ global stock markets. partial matching enabled, possible type just first letter e.g. ‘c’ commodities. first retrieved timestamp pricing component printed, followed dataframe showing similar data oanda_quote() instruments selected market. data ordered daily percentage change, positive negative.","code":"oanda_view() Enter market [a]llfx [b]onds [c]ommodities [f]x [m]etals [s]tocks: c #> Retrieving commodities [..........] #> 2021-12-11 01:58:21 / M #> open high low last %chg #> NATGAS_USD 3.76200 3.9260 3.72400 3.85200 2.3923 #> BCO_USD 74.52600 76.2310 74.32600 75.88000 1.8168 #> WTICO_USD 70.91200 72.5540 70.55400 72.19000 1.8022 #> WHEAT_USD 7.67200 7.7710 7.57100 7.72700 0.7169 #> XPT_USD 930.20200 939.6000 924.29400 936.43800 0.6704 #> SOYBN_USD 12.63500 12.7580 12.58800 12.67800 0.3403 #> SUGAR_USD 0.19274 0.1948 0.19176 0.19334 0.3113 #> CORN_USD 5.89800 5.9410 5.86800 5.90200 0.0678 #> XCU_USD 4.30292 4.3479 4.26536 4.28361 -0.4488 #> XPD_USD 1805.14800 1815.1260 1729.61100 1752.81200 -2.8993"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"oanda_orders-oanda_positions","dir":"Articles","previous_headings":"The OANDA Functions","what":"oanda_orders() / oanda_positions()","title":"ichimoku: The OANDA fxTrade API","text":"Provides summary aggregate orders/positions held OANDA fxTrade clients price level. ‘instrument’ required argument. latest order/position book retrieved unless optional argument ‘time’ used specify time retrieve order/position book. data returned dataframe, parameters saved attributes can viewed look(). chart showing percentage long short orders/positions price level output graphical device. Please note feature implemented OANDA certain major currency pairs considered experimental. Note also order book, interquartile range order levels charted orders placed far market price. returned dataframe contains full order book nevertheless.","code":"df <- oanda_positions(\"GBP_JPY\")"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"available-instruments","dir":"Articles","previous_headings":"","what":"Available Instruments","title":"ichimoku: The OANDA fxTrade API","text":"list financial instruments available account may retrieved oanda_instruments(). available instruments also automatically populated input oanda_studio(). list serves reference may differ actually available account type /country/region. Note: table saved internal package data used fallback instruments API call fails. case, warning issued per session subsequent calls return cached list.","code":"oanda_instruments() #> name displayName type #> 1 AU200_AUD Australia 200 CFD #> 2 AUD_CAD AUD/CAD CURRENCY #> 3 AUD_CHF AUD/CHF CURRENCY #> 4 AUD_HKD AUD/HKD CURRENCY #> 5 AUD_JPY AUD/JPY CURRENCY #> 6 AUD_NZD AUD/NZD CURRENCY #> 7 AUD_SGD AUD/SGD CURRENCY #> 8 AUD_USD AUD/USD CURRENCY #> 9 BCO_USD Brent Crude Oil CFD #> 10 CAD_CHF CAD/CHF CURRENCY #> 11 CAD_HKD CAD/HKD CURRENCY #> 12 CAD_JPY CAD/JPY CURRENCY #> 13 CAD_SGD CAD/SGD CURRENCY #> 14 CH20_CHF Switzerland 20 CFD #> 15 CHF_HKD CHF/HKD CURRENCY #> 16 CHF_JPY CHF/JPY CURRENCY #> 17 CHF_ZAR CHF/ZAR CURRENCY #> 18 CHINAH_HKD China H Shares CFD #> 19 CN50_USD China A50 CFD #> 20 CORN_USD Corn CFD #> 21 DE10YB_EUR Bund CFD #> 22 DE30_EUR Germany 30 CFD #> 23 ESPIX_EUR Spain 35 CFD #> 24 EU50_EUR Europe 50 CFD #> 25 EUR_AUD EUR/AUD CURRENCY #> 26 EUR_CAD EUR/CAD CURRENCY #> 27 EUR_CHF EUR/CHF CURRENCY #> 28 EUR_CZK EUR/CZK CURRENCY #> 29 EUR_DKK EUR/DKK CURRENCY #> 30 EUR_GBP EUR/GBP CURRENCY #> 31 EUR_HKD EUR/HKD CURRENCY #> 32 EUR_HUF EUR/HUF CURRENCY #> 33 EUR_JPY EUR/JPY CURRENCY #> 34 EUR_NOK EUR/NOK CURRENCY #> 35 EUR_NZD EUR/NZD CURRENCY #> 36 EUR_PLN EUR/PLN CURRENCY #> 37 EUR_SEK EUR/SEK CURRENCY #> 38 EUR_SGD EUR/SGD CURRENCY #> 39 EUR_TRY EUR/TRY CURRENCY #> 40 EUR_USD EUR/USD CURRENCY #> 41 EUR_ZAR EUR/ZAR CURRENCY #> 42 FR40_EUR France 40 CFD #> 43 GBP_AUD GBP/AUD CURRENCY #> 44 GBP_CAD GBP/CAD CURRENCY #> 45 GBP_CHF GBP/CHF CURRENCY #> 46 GBP_HKD GBP/HKD CURRENCY #> 47 GBP_JPY GBP/JPY CURRENCY #> 48 GBP_NZD GBP/NZD CURRENCY #> 49 GBP_PLN GBP/PLN CURRENCY #> 50 GBP_SGD GBP/SGD CURRENCY #> 51 GBP_USD GBP/USD CURRENCY #> 52 GBP_ZAR GBP/ZAR CURRENCY #> 53 HK33_HKD Hong Kong 33 CFD #> 54 HKD_JPY HKD/JPY CURRENCY #> 55 JP225_USD Japan 225 CFD #> 56 JP225Y_JPY Japan 225 (JPY) CFD #> 57 NAS100_USD US Nas 100 CFD #> 58 NATGAS_USD Natural Gas CFD #> 59 NL25_EUR Netherlands 25 CFD #> 60 NZD_CAD NZD/CAD CURRENCY #> 61 NZD_CHF NZD/CHF CURRENCY #> 62 NZD_HKD NZD/HKD CURRENCY #> 63 NZD_JPY NZD/JPY CURRENCY #> 64 NZD_SGD NZD/SGD CURRENCY #> 65 NZD_USD NZD/USD CURRENCY #> 66 SG30_SGD Singapore 30 CFD #> 67 SGD_CHF SGD/CHF CURRENCY #> 68 SGD_JPY SGD/JPY CURRENCY #> 69 SOYBN_USD Soybeans CFD #> 70 SPX500_USD US SPX 500 CFD #> 71 SUGAR_USD Sugar CFD #> 72 TRY_JPY TRY/JPY CURRENCY #> 73 UK100_GBP UK 100 CFD #> 74 UK10YB_GBP UK 10Y Gilt CFD #> 75 US2000_USD US Russ 2000 CFD #> 76 US30_USD US Wall St 30 CFD #> 77 USB02Y_USD US 2Y T-Note CFD #> 78 USB05Y_USD US 5Y T-Note CFD #> 79 USB10Y_USD US 10Y T-Note CFD #> 80 USB30Y_USD US T-Bond CFD #> 81 USD_CAD USD/CAD CURRENCY #> 82 USD_CHF USD/CHF CURRENCY #> 83 USD_CNH USD/CNH CURRENCY #> 84 USD_CZK USD/CZK CURRENCY #> 85 USD_DKK USD/DKK CURRENCY #> 86 USD_HKD USD/HKD CURRENCY #> 87 USD_HUF USD/HUF CURRENCY #> 88 USD_JPY USD/JPY CURRENCY #> 89 USD_MXN USD/MXN CURRENCY #> 90 USD_NOK USD/NOK CURRENCY #> 91 USD_PLN USD/PLN CURRENCY #> 92 USD_SEK USD/SEK CURRENCY #> 93 USD_SGD USD/SGD CURRENCY #> 94 USD_THB USD/THB CURRENCY #> 95 USD_TRY USD/TRY CURRENCY #> 96 USD_ZAR USD/ZAR CURRENCY #> 97 WHEAT_USD Wheat CFD #> 98 WTICO_USD West Texas Oil CFD #> 99 XAG_AUD Silver/AUD METAL #> 100 XAG_CAD Silver/CAD METAL #> 101 XAG_CHF Silver/CHF METAL #> 102 XAG_EUR Silver/EUR METAL #> 103 XAG_GBP Silver/GBP METAL #> 104 XAG_HKD Silver/HKD METAL #> 105 XAG_JPY Silver/JPY METAL #> 106 XAG_NZD Silver/NZD METAL #> 107 XAG_SGD Silver/SGD METAL #> 108 XAG_USD Silver METAL #> 109 XAU_AUD Gold/AUD METAL #> 110 XAU_CAD Gold/CAD METAL #> 111 XAU_CHF Gold/CHF METAL #> 112 XAU_EUR Gold/EUR METAL #> 113 XAU_GBP Gold/GBP METAL #> 114 XAU_HKD Gold/HKD METAL #> 115 XAU_JPY Gold/JPY METAL #> 116 XAU_NZD Gold/NZD METAL #> 117 XAU_SGD Gold/SGD METAL #> 118 XAU_USD Gold METAL #> 119 XAU_XAG Gold/Silver METAL #> 120 XCU_USD Copper CFD #> 121 XPD_USD Palladium CFD #> 122 XPT_USD Platinum CFD #> 123 ZAR_JPY ZAR/JPY CURRENCY"},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"caching-implementation","dir":"Articles","previous_headings":"","what":"Caching Implementation","title":"ichimoku: The OANDA fxTrade API","text":"package retrieves following session (first time used) caches variables use: OANDA fxTrade API key OANDA fxTrade account associated fxTrade API key OANDA list available instruments reason become invalid outdated, please re-load package (restart R session) enable variables refreshed. Calling oanda_switch() also clear cached variables.","code":""},{"path":"https://shikokuchuo.net/ichimoku/articles/xoanda.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"ichimoku: The OANDA fxTrade API","text":"‘OANDA’ ‘fxTrade’ trademarks owned OANDA Corporation, entity unaffiliated ichimoku package, authors copyright holders. OANDA fxTrade API developer website: https://developer.oanda.com/.","code":""},{"path":"https://shikokuchuo.net/ichimoku/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Charlie Gao. Author, maintainer. Hibiki AI Limited. Copyright holder.","code":""},{"path":"https://shikokuchuo.net/ichimoku/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Gao C (2024). ichimoku: Visualization Tools Ichimoku Kinko Hyo Strategies. R package version 1.5.4.9000, https://doi.org/10.5281/zenodo.7879346.","code":"@Manual{, title = {ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies}, author = {Charlie Gao}, year = {2024}, note = {R package version 1.5.4.9000}, url = {https://doi.org/10.5281/zenodo.7879346}, }"},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"ichimoku-","dir":"","previous_headings":"","what":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"Visualization Tools Ichimoku Kinko Hyo Strategies implementation ‘Ichimoku Kinko Hyo’, also commonly known ‘cloud charts’. Static interactive visualizations tools creating, backtesting development quantitative ‘ichimoku’ strategies. described Sasaki (1996, ISBN:4925152009), technique refinement candlestick charting, originating Japan now widespread use technical analysis worldwide. Translating ‘one-glance equilibrium chart’, allows price action market structure financial securities determined ‘--glance’. Incorporates interface OANDA fxTrade API https://developer.oanda.com/ retrieving historical live streaming price data major currencies, metals, commodities, government bonds stock indices.","code":""},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"quick-start","dir":"","previous_headings":"","what":"Quick Start","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"Simply ichimoku() plot(): autostrat() automatically evaluate rank top-performing strategies:","code":"library(ichimoku) cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") plot(cloud, window = \"2020-05/\") autostrat(cloud, n = 3) #> [,1] [,2] [,3] #> Strategy \"senkouB > tenkan\" \"cloudB > tenkan\" \"senkouB > kijun\" #> --------------------- \"----------\" \"----------\" \"----------\" #> Strategy cuml return % 17.49 16.08 14.1 #> Per period mean ret % 0.0906 0.0838 0.0741 #> Periods in market 63 51 64 #> Total trades 3 3 3 #> Average trade length 21 17 21.33 #> Trade success % 100 100 100 #> Worst trade ret % 3.64 3.16 3.49 #> --------------------- \"----------\" \"----------\" \"----------\" #> Benchmark cuml ret % 5.53 5.53 5.53 #> Per period mean ret % 0.0302 0.0302 0.0302 #> Periods in market 178 178 178 #> --------------------- \"----------\" \"----------\" \"----------\" #> Direction \"long\" \"long\" \"long\" #> Start 2020-04-20 2020-04-20 2020-04-20 #> End 2020-12-23 2020-12-23 2020-12-23 #> Ticker \"TKR\" \"TKR\" \"TKR\""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"data--visualization","dir":"","previous_headings":"Principal ichimoku functions","what":"Data & Visualization","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"ichimoku() - create ichimoku object price data. plot() / iplot() - plot (interactive) cloud charts ichimoku objects. archive() - reading/writing objects /archive files data verification. oanda() - retrieve price data OANDA fxTrade API.","code":""},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"strategies--ml","dir":"","previous_headings":"Principal ichimoku functions","what":"Strategies & ML","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"strat() - augment ichimoku object strategy, including combined asymmetric strategies. autostrat() - automatically evaluate rank top-performing strategies. mlgrid() - generate numeric representation ichimoku cloud chart. relative() - produce statistical summary latest ichimoku numeric representation relative historical values.","code":""},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"real-time","dir":"","previous_headings":"Principal ichimoku functions","what":"Real-time","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"oanda_chart() - plot real-time ichimoku cloud charts using OANDA data. oanda_studio() - complete live analysis environment using OANDA data implemented R Shiny. oanda_stream() / oanda_quote() - obtain latest live data stream / quote OANDA fxTrade API. oanda_view() - market overview showing relative performance constituents. oanda_orders() / oanda_positions() - retrieve aggregate OANDA fxTrade order / position book.","code":""},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"vignettes","dir":"","previous_headings":"","what":"Vignettes","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"Long-form documentation links: { 1 } Cloud Charts - Reference Manual { 2 } Beyond Visualization - Quantitative Strategies { 3 } Auxiliary Functions { 4 } OANDA fxTrade API","code":""},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"Install latest release CRAN R-multiverse: current development version available R-universe:","code":"install.packages(\"ichimoku\") install.packages(\"ichimoku\", repos = \"https://shikokuchuo.r-universe.dev\")"},{"path":"https://shikokuchuo.net/ichimoku/index.html","id":"references","dir":"","previous_headings":"","what":"References","title":"Visualization and Tools for Ichimoku Kinko Hyo Strategies","text":"Sasaki, H. 佐々木 英信 (1996), 一目均衡表の研究 [ichimoku kinkouhyou kenkyuu]. Tokyo, Japan: Toushi Radar. ‘OANDA’ ‘fxTrade’ trademarks owned OANDA Corporation, entity unaffiliated ichimoku package. – ◈ ichimoku R package: https://shikokuchuo.net/ichimoku/. Listed CRAN Finance Task View: https://cran.r-project.org/view=Finance. – Please note project released Contributor Code Conduct. participating project agree abide terms.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":null,"dir":"Reference","previous_headings":"","what":"Read/write Objects <> Archive Files with Data Verification — archive","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"Read write objects /archival storage native RData format, verification data integrity.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"","code":"archive(..., object, file)"},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"... unnamed arguments parsed 'file' one argument, 'object' 'file' two arguments. object (write operations) object. file name file connection object saved read .","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"read operations: object originally archived. write operations: filename supplied. 'object' written 'file'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"read operations: specify 'file', alternatively arguments specified, system dialog opened allowing file chosen interactively. 'file' read return value may assigned object. confirmation message issued file read operation successful. write operations: specify 'object' 'file'. 'object' specified 'file' left empty (see examples), system dialog opened allowing file save location chosen interactively. 'object' written 'file'. confirmation message issued file write operation successful.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"data-verification","dir":"Reference","previous_headings":"","what":"Data Verification","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"SHA256 hash original object written archive. allows data integrity restored object verified archive read back. write operations: confirmation SHA256 hash written file displayed. read operations: 'data verified' message issued SHA256 hash found within data file authenticated.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"Please refer reference vignette calling: vignette(\"reference\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/archive.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read/write Objects <> Archive Files with Data Verification — archive","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") file <- tempfile() archive(cloud, file) #> Archive written to '/tmp/RtmpK9knIu/file16dc22295b3a' #> SHA256: f04ccb6b8869372733acb7ad07d468624e58b1b8ee9d6a715ab13e698fd1373b restored <- archive(file) #> Archive read from '/tmp/RtmpK9knIu/file16dc22295b3a' #> Data verified by SHA256: f04ccb6b8869372733acb7ad07d468624e58b1b8ee9d6a715ab13e698fd1373b unlink(file) if (interactive()) { # Only run examples in interactive R sessions # Read file to 'object' using system dialog: object <- archive() # Write 'cloud' to file using system dialog: archive(cloud, ) }"},{"path":"https://shikokuchuo.net/ichimoku/reference/as.data.frame.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert ichimoku to data.frame — as.data.frame.ichimoku","title":"Convert ichimoku to data.frame — as.data.frame.ichimoku","text":"optimised 'ichimoku' 'data.frame' constructor.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/as.data.frame.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert ichimoku to data.frame — as.data.frame.ichimoku","text":"","code":"# S3 method for class 'ichimoku' as.data.frame(x, row.names, optional, keep.attrs = FALSE, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/as.data.frame.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert ichimoku to data.frame — as.data.frame.ichimoku","text":"x object class 'ichimoku'. row.names used. optional used. keep.attrs [default FALSE] set TRUE, preserve custom attributes set original object. ... arguments passed methods.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/as.data.frame.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert ichimoku to data.frame — as.data.frame.ichimoku","text":"'data.frame' object. ichimoku object index preserved first column header 'index'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/as.data.frame.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert ichimoku to data.frame — as.data.frame.ichimoku","text":"function S3 method generic function .data.frame() class 'ichimoku'. can invoked calling .data.frame(x) object 'x' class 'ichimoku'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/as.data.frame.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert ichimoku to data.frame — as.data.frame.ichimoku","text":"","code":"cloud <- ichimoku(sample_ohlc_data) df <- as.data.frame(cloud) str(df) #> 'data.frame':\t281 obs. of 13 variables: #> $ index : POSIXct, format: \"2020-01-02 00:00:00\" \"2020-01-03 00:00:00\" ... #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... df2 <- as.data.frame(cloud, keep.attrs = TRUE) str(df2) #> 'data.frame':\t281 obs. of 13 variables: #> $ index : POSIXct, format: \"2020-01-02 00:00:00\" \"2020-01-03 00:00:00\" ... #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... #> - attr(*, \"index\")= num [1:281] 1.58e+09 1.58e+09 1.58e+09 1.58e+09 1.58e+09 ... #> ..- attr(*, \"tzone\")= chr \"\" #> ..- attr(*, \"tclass\")= chr [1:2] \"POSIXct\" \"POSIXt\" #> - attr(*, \"periods\")= int [1:3] 9 26 52 #> - attr(*, \"periodicity\")= num 86400 #> - attr(*, \"ticker\")= chr \"sample_ohlc_data\""},{"path":"https://shikokuchuo.net/ichimoku/reference/autoplot.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Ichimoku Objects with ggplot2 — autoplot","title":"Plot Ichimoku Objects with ggplot2 — autoplot","text":"Plot Ichimoku Kinko Hyo cloud charts ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autoplot.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Ichimoku Objects with ggplot2 — autoplot","text":"","code":"# S3 method for class 'ichimoku' autoplot( object, window, ticker, subtitle, theme = c(\"classic\", \"dark\", \"mono\", \"noguchi\", \"okabe-ito\", \"solarized\"), strat = TRUE, type = c(\"none\", \"r\", \"s\", \"bar\", \"line\"), custom, ... )"},{"path":"https://shikokuchuo.net/ichimoku/reference/autoplot.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Ichimoku Objects with ggplot2 — autoplot","text":"object object class 'ichimoku'. window (optional) date-time window subset plot, ISO-8601 compatible range strings format used 'xts' objects, example \"2020-02-15/2020-08-15\" \"2020-02-15/\", \"/2020-08\" \"2020-07\". ticker (optional) specify ticker (text) include chart heading. set, ticker saved within ichimoku object used. subtitle (optional) specify subtitle display chart title. theme [default 'classic'] choices 'dark', 'mono', 'noguchi', 'okabe-ito' 'solarized'. Alternatively, supply vector 12 colour values (hex codes names) user-defined theme. strat [default TRUE] ichimoku object contains strategy, periods strategy results position shaded, strategy printed chart subtitle (otherwise specified). Set FALSE turn behaviour. type [default 'none'] type sub-plot display beneath ichimoku cloud chart, choice 'none', 'r' 's' corresponding oscillator type, 'bar' 'line' custom plots. custom (optional) character string (containing regular expression) matching column name variable displayed sub-plot. Specify type = 'bar' type = 'line', otherwise type settings take precedence. ... arguments used method.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autoplot.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Ichimoku Objects with ggplot2 — autoplot","text":"ggplot2 object S3 classes 'gg' 'ggplot'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autoplot.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot Ichimoku Objects with ggplot2 — autoplot","text":"function S3 method generic function autoplot() class 'ichimoku'. can invoked calling autoplot(x) object 'x' class 'ichimoku'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":null,"dir":"Reference","previous_headings":"","what":"Automated Ichimoku Strategies — autostrat","title":"Automated Ichimoku Strategies — autostrat","text":"Generate list top performing ichimoku cloud strategies based simple indicator conditions form 'c1 > c2' (level 1), complex combined strategies form 'c1 > c2 & c3 > c4' (level 2), complex asymmetric strategies form 'c1 > c2 x c3 > c4' (level 3).","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Automated Ichimoku Strategies — autostrat","text":"","code":"autostrat(x, n = 8, dir = c(\"long\", \"short\"), level = 1, quietly)"},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Automated Ichimoku Strategies — autostrat","text":"x ichimoku object. n [default 8] select top 'n' number strategies return. dir [default 'long'] trade direction, either 'long' 'short'. level [default 1] return simple strategies. complex strategies, set level 2 return combined strategies form 's1 & s2' level 3 return asymmetric strategies form 's1 x s2'. quietly (optional) set TRUE, suppress printing additional output console return quietly.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Automated Ichimoku Strategies — autostrat","text":"Returned invisibly, list 'n' ichimoku objects containing strategies, attributes 'logret' (vector cumulative log returns strategies) 'summary' (matrix summaries top 'n' strategies). addition, strategy summaries printed console.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Automated Ichimoku Strategies — autostrat","text":"Ichimoku objects strategy returned list. cumulative log returns strategies well summaries top 'n' strategies saved attributes list. information may retrieved using look returned list. individual ichimoku object may accessed via position list, e.g. [[1]] 1st item.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"Automated Ichimoku Strategies — autostrat","text":"Please refer strategies vignette calling: vignette(\"strategies\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/autostrat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Automated Ichimoku Strategies — autostrat","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") stratlist <- autostrat(cloud, n = 3, quietly = TRUE) look(stratlist) #> $logret #> senkouB_tenkan cloudB_tenkan senkouB_kijun cloudB_kijun low_tenkan #> 0.144869048 0.132721126 0.124552623 0.124476092 0.119988595 #> cloudB_close high_tenkan cloudB_low senkouB_close cloudT_kijun #> 0.117048881 0.112062056 0.110900734 0.110699399 0.103153955 #> senkouA_kijun senkouB_low cloudT_tenkan cloudT_high low_kijun #> 0.103077424 0.101480718 0.093961798 0.088759707 0.088503030 #> senkouB_high chikou_senkouA high_kijun senkouA_tenkan close_tenkan #> 0.086708526 0.084344426 0.083373239 0.081813876 0.079948752 #> tenkan_chikou senkouA_high cloudB_high senkouA_low senkouA_close #> 0.078961923 0.076693196 0.074642015 0.073761187 0.073712567 #> close_kijun chikou_cloudT cloudT_close kijun_chikou cloudT_low #> 0.071380845 0.069192621 0.067363085 0.066288776 0.064341171 #> chikou_cloudB chikou_close kijun_tenkan chikou_low chikou_senkouB #> 0.064291073 0.062225816 0.055091789 0.053536566 0.049139267 #> senkouA_senkouB senkouB_chikou chikou_high low_chikou high_chikou #> 0.048655509 0.045949698 0.042730532 0.041552399 0.034326207 #> close_chikou cloudB_chikou low_cloudT tenkan_kijun chikou_kijun #> 0.032863149 0.030797893 0.030747795 0.030128362 0.028800189 #> cloudT_chikou close_cloudT kijun_close senkouB_senkouA tenkan_close #> 0.025896344 0.024713830 0.023708120 0.023618778 0.023402736 #> close_senkouA low_senkouA high_cloudB high_senkouA tenkan_senkouA #> 0.021376398 0.021327779 0.020446951 0.018395770 0.013275089 #> senkouA_chikou chikou_tenkan high_senkouB kijun_low high_cloudT #> 0.010744539 0.010161327 0.008380439 0.006585935 0.006329258 #> tenkan_cloudT kijun_high low_senkouB tenkan_high kijun_senkouA #> 0.001127167 -0.003436078 -0.006391752 -0.007150571 -0.007988459 #> kijun_cloudT low_cloudB tenkan_low close_senkouB close_cloudB #> -0.008064990 -0.015811768 -0.015890560 -0.018622484 -0.021959916 #> tenkan_cloudB kijun_cloudB kijun_senkouB tenkan_senkouB #> -0.037632160 -0.040858512 -0.040935043 -0.049780083 #> #> $summary #> [,1] [,2] #> Strategy \"senkouB > tenkan\" \"cloudB > tenkan\" #> --------------------- \"----------\" \"----------\" #> Strategy cuml return % 17.49 16.08 #> Per period mean ret % 0.0906 0.0838 #> Periods in market 63 51 #> Total trades 3 3 #> Average trade length 21 17 #> Trade success % 100 100 #> Worst trade ret % 3.64 3.16 #> --------------------- \"----------\" \"----------\" #> Benchmark cuml ret % 5.53 5.53 #> Per period mean ret % 0.0302 0.0302 #> Periods in market 178 178 #> --------------------- \"----------\" \"----------\" #> Direction \"long\" \"long\" #> Start 2020-04-19 23:00:00 2020-04-19 23:00:00 #> End 2020-12-23 2020-12-23 #> Ticker \"TKR\" \"TKR\" #> [,3] #> Strategy \"senkouB > kijun\" #> --------------------- \"----------\" #> Strategy cuml return % 14.1 #> Per period mean ret % 0.0741 #> Periods in market 64 #> Total trades 3 #> Average trade length 21.33 #> Trade success % 100 #> Worst trade ret % 3.49 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> strat <- stratlist[[2]] summary(strat) #> [,1] #> Strategy \"cloudB > tenkan\" #> --------------------- \"----------\" #> Strategy cuml return % 16.08 #> Per period mean ret % 0.0838 #> Periods in market 51 #> Total trades 3 #> Average trade length 17 #> Trade success % 100 #> Worst trade ret % 3.16 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" autostrat(cloud, n = 1, dir = \"short\", level = 2) #> [,1] #> Strategy \"close > chikou & tenkan > senkouB\" #> --------------------- \"----------\" #> Strategy cuml return % 11.21 #> Per period mean ret % 0.0597 #> Periods in market 20 #> Total trades 4 #> Average trade length 5 #> Trade success % 75 #> Worst trade ret % -0.44 #> --------------------- \"----------\" #> Benchmark cuml ret % -5.24 #> Per period mean ret % -0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"short\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" autostrat(cloud, n = 1, dir = \"long\", level = 3) #> [,1] #> Strategy \"senkouB > senkouA x kijun > low\" #> --------------------- \"----------\" #> Strategy cuml return % 2.49 #> Per period mean ret % 0.0138 #> Periods in market 59 #> Total trades 3 #> Average trade length 19.67 #> Trade success % 66.67 #> Worst trade ret % -2.49 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\""},{"path":"https://shikokuchuo.net/ichimoku/reference/coredata.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract the Core Data of Ichimoku Objects — coredata","title":"Extract the Core Data of Ichimoku Objects — coredata","text":"Method extracting core data matrix ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/coredata.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract the Core Data of Ichimoku Objects — coredata","text":"","code":"# S3 method for class 'ichimoku' coredata(x, fmt, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/coredata.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract the Core Data of Ichimoku Objects — coredata","text":"x object class 'ichimoku'. fmt (optional) set TRUE retain index row names returned matrix, character string passed 'format' argument format.POSIXct() format values specific way. ... arguments passed methods.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/coredata.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract the Core Data of Ichimoku Objects — coredata","text":"numeric matrix containing ichimoku object data, stripped index unless 'fmt' specified case index retained character values matrix row names.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/coredata.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract the Core Data of Ichimoku Objects — coredata","text":"function S3 method generic function coredata() class 'ichimoku'. can invoked calling coredata(x) object 'x' class 'ichimoku'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/coredata.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract the Core Data of Ichimoku Objects — coredata","text":"","code":"cloud <- ichimoku(sample_ohlc_data) coredata(cloud)[101:120, ] #> open high low close cd tenkan kijun senkouA senkouB chikou cloudT #> [1,] 122.4 122.6 121.1 121.9 -1 121.05 123.90 125.675 124.85 135.6 125.675 #> [2,] 121.9 123.7 121.7 123.3 1 121.40 123.80 125.675 124.85 134.5 125.675 #> [3,] 123.3 124.0 123.0 124.0 1 121.55 123.80 125.675 124.85 134.3 125.675 #> [4,] 124.2 124.3 124.0 124.1 -1 121.75 123.65 125.975 124.85 135.9 125.975 #> [5,] 124.1 124.1 123.4 123.9 -1 122.25 123.65 126.475 124.85 135.2 126.475 #> [6,] 123.9 124.7 123.7 124.5 1 122.90 123.65 126.575 124.85 135.7 126.575 #> [7,] 124.5 124.7 123.9 124.2 -1 122.90 123.60 126.250 124.85 135.4 126.250 #> [8,] 124.2 125.2 124.0 124.7 1 123.15 123.60 126.150 124.85 135.7 126.150 #> [9,] 124.7 129.8 124.7 129.6 1 125.45 124.45 125.675 124.85 135.6 125.675 #> [10,] 129.9 130.6 129.9 130.2 1 126.15 124.85 125.625 124.85 136.2 125.625 #> [11,] 130.2 132.5 129.7 131.6 1 127.75 125.80 125.625 124.85 136.5 125.625 #> [12,] 131.6 132.0 131.1 131.7 1 127.95 125.80 125.550 124.85 138.1 125.550 #> [13,] 131.7 133.4 131.6 133.0 1 128.40 126.25 125.425 124.85 137.8 125.425 #> [14,] 133.0 134.3 131.9 132.5 -1 129.00 126.70 125.550 124.85 139.3 125.550 #> [15,] 132.4 132.8 131.2 131.9 -1 129.10 126.70 125.650 124.85 139.3 125.650 #> [16,] 131.9 132.0 131.6 131.9 0 129.15 126.70 125.875 124.85 138.8 125.875 #> [17,] 131.9 132.3 131.1 132.0 1 129.50 126.70 125.400 124.85 137.2 125.400 #> [18,] 132.0 134.7 131.8 134.3 1 132.20 126.90 124.825 124.85 135.2 124.850 #> [19,] 134.3 134.4 132.0 132.3 -1 132.20 126.90 123.800 124.85 137.0 124.850 #> [20,] 132.3 132.8 131.5 131.8 -1 132.90 126.90 123.375 124.55 136.6 124.550 #> cloudB #> [1,] 124.850 #> [2,] 124.850 #> [3,] 124.850 #> [4,] 124.850 #> [5,] 124.850 #> [6,] 124.850 #> [7,] 124.850 #> [8,] 124.850 #> [9,] 124.850 #> [10,] 124.850 #> [11,] 124.850 #> [12,] 124.850 #> [13,] 124.850 #> [14,] 124.850 #> [15,] 124.850 #> [16,] 124.850 #> [17,] 124.850 #> [18,] 124.825 #> [19,] 123.800 #> [20,] 123.375"},{"path":"https://shikokuchuo.net/ichimoku/reference/df_append.html","id":null,"dir":"Reference","previous_headings":"","what":"Append New Data to Dataframe — df_append","title":"Append New Data to Dataframe — df_append","text":"Update 'data.frame' object new data. Can used append new updated time series data existing dataframe, observation indexed unique timestamp/identifier key column.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_append.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Append New Data to Dataframe — df_append","text":"","code":"df_append(old, new, key = \"time\", keep.attr = \"timestamp\")"},{"path":"https://shikokuchuo.net/ichimoku/reference/df_append.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Append New Data to Dataframe — df_append","text":"old data.frame object containing existing data. new data.frame object containing new data. key [default 'time'] column name used key, provided character string. keep.attr [default 'timestamp'] name attribute 'new' retain, present, provided character string.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_append.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Append New Data to Dataframe — df_append","text":"data.frame existing data appended new data. data 'new' contains data value key column 'old', data 'new' overwrite data 'old'. attribute specified 'keep.attr' present 'new', retained. non-required attributes dropped.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_append.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Append New Data to Dataframe — df_append","text":"Can used update price dataframes retrieved oanda. function designed update existing data new values become available. opposed df_merge, data 'new' overwrite data 'old' rather create duplicates.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_append.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Append New Data to Dataframe — df_append","text":"","code":"data1 <- sample_ohlc_data[1:8, ] data1 #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 data2 <- sample_ohlc_data[7:10, ] data2 #> time open high low close volume #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879 df_append(data1, data2) #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879"},{"path":"https://shikokuchuo.net/ichimoku/reference/df_merge.html","id":null,"dir":"Reference","previous_headings":"","what":"Merge Dataframes — df_merge","title":"Merge Dataframes — df_merge","text":"Full join arbitrary number 'data.frame' objects passed arguments, preserving unique entries. Can used combine historical time series data observation indexed unique timestamp periods complete.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_merge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merge Dataframes — df_merge","text":"","code":"df_merge(...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/df_merge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merge Dataframes — df_merge","text":"... data.frame objects combine.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_merge.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Merge Dataframes — df_merge","text":"data.frame containing unique entries objects passed argument.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_merge.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Merge Dataframes — df_merge","text":"Can used join price dataframes retrieved oanda. function designed join complete historical data. data merged contains data incomplete periods, entries preserved rather updated. incomplete periods detected within data, warning issued, resulting dataframe manually checked case contains unwanted duplicates. Use df_append updating dataframes new values.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/df_merge.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Merge Dataframes — df_merge","text":"","code":"data1 <- sample_ohlc_data[1:6, ] data1 #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 data2 <- sample_ohlc_data[4:10, ] data2 #> time open high low close volume #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879 df_merge(data1, data2) #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842 #> 7 2020-01-10 125.3 125.3 124.8 125.2 2548 #> 8 2020-01-13 125.2 125.3 125.1 125.2 2946 #> 9 2020-01-14 125.2 125.2 124.3 124.4 2796 #> 10 2020-01-15 124.4 124.5 123.7 123.9 2879"},{"path":"https://shikokuchuo.net/ichimoku/reference/dot-ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"ichimoku Technical Utility Version — .ichimoku","title":"ichimoku Technical Utility Version — .ichimoku","text":"Create ichimoku object containing values components Ichimoku Kinko Hyo cloud chart. object encapsulates date-time index, OHLC pricing data, candle direction, cloud lines Tenkan-sen, Kijun-sen, Senkou span , Senkou span B Chikou span, well values cloud top cloud base.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/dot-ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ichimoku Technical Utility Version — .ichimoku","text":"","code":".ichimoku(x, ticker, periods = c(9L, 26L, 52L), ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/dot-ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ichimoku Technical Utility Version — .ichimoku","text":"x data.frame object POSIXct date-time index first column numeric OHLC pricing data second fifth columns. ticker (optional) specify ticker identify instrument, otherwise set name input object. periods [default c(9L, 26L, 52L)] vector defining length periods used cloud. parameter shoud normally modified using values invalid context traditional ichimoku analysis. ... additional arguments, instance 'holidays', passed along tradingDays calculating future cloud daily data.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/dot-ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ichimoku Technical Utility Version — .ichimoku","text":"ichimoku object S3 classes 'ichimoku', 'xts' 'zoo'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/dot-ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ichimoku Technical Utility Version — .ichimoku","text":"faster version ichimoku can used data dataframe prescribed format. support argument 'keep.data'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/grid_dup.html","id":null,"dir":"Reference","previous_headings":"","what":"Duplicates of expand.grid for 2 Variables — grid_dup","title":"Duplicates of expand.grid for 2 Variables — grid_dup","text":"Create vector element positions duplicates output expand.grid 2 identical vectors. efficient method creating combinations 2 variables.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/grid_dup.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Duplicates of expand.grid for 2 Variables — grid_dup","text":"","code":"grid_dup(n, omit.id)"},{"path":"https://shikokuchuo.net/ichimoku/reference/grid_dup.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Duplicates of expand.grid for 2 Variables — grid_dup","text":"n length vector passed expand.grid(). omit.id (optional) set TRUE also select elements 2 items identical. output expand.grid, subset remove duplicates 'omit.id' set TRUE equivalent utils::combn(n, 2).","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/grid_dup.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Duplicates of expand.grid for 2 Variables — grid_dup","text":"numeric vector.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/grid_dup.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Duplicates of expand.grid for 2 Variables — grid_dup","text":"","code":"n <- 3 expand.grid(1:n, 1:n) #> Var1 Var2 #> 1 1 1 #> 2 2 1 #> 3 3 1 #> 4 1 2 #> 5 2 2 #> 6 3 2 #> 7 1 3 #> 8 2 3 #> 9 3 3 expand.grid(1:n, 1:n)[-grid_dup(n), ] #> Var1 Var2 #> 1 1 1 #> 2 2 1 #> 3 3 1 #> 5 2 2 #> 6 3 2 #> 9 3 3 expand.grid(1:n, 1:n)[-grid_dup(n, omit.id = TRUE), ] #> Var1 Var2 #> 2 2 1 #> 3 3 1 #> 6 3 2"},{"path":"https://shikokuchuo.net/ichimoku/reference/hasStrat.html","id":null,"dir":"Reference","previous_headings":"","what":"hasStrat — hasStrat","title":"hasStrat — hasStrat","text":"function checking object contains strategy.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/hasStrat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"hasStrat — hasStrat","text":"","code":"hasStrat(x)"},{"path":"https://shikokuchuo.net/ichimoku/reference/hasStrat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"hasStrat — hasStrat","text":"x object.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/hasStrat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"hasStrat — hasStrat","text":"logical value TRUE 'strat' attribute 'x' set, otherwise FALSE.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/hasStrat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"hasStrat — hasStrat","text":"Designed used ichimoku functions either S3 methods class 'ichimoku' validation 'x' ichimoku object, hence check class 'x' within function.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/hasStrat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"hasStrat — hasStrat","text":"","code":"cloud <- ichimoku(sample_ohlc_data) strat <- strat(cloud) # TRUE: hasStrat(strat) #> [1] TRUE # FALSE: hasStrat(cloud) #> [1] FALSE"},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku-package.html","id":null,"dir":"Reference","previous_headings":"","what":"ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies — ichimoku-package","title":"ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies — ichimoku-package","text":"implementation 'Ichimoku Kinko Hyo', also commonly known 'cloud charts'. Static interactive visualizations tools creating, backtesting development quantitative 'ichimoku' strategies. described Sasaki (1996, ISBN:4925152009), technique refinement candlestick charting, originating Japan now widespread use technical analysis worldwide. Translating 'one-glance equilibrium chart', allows price action market structure financial securities determined '--glance'. Incorporates interface OANDA fxTrade API https://developer.oanda.com/ retrieving historical live streaming price data major currencies, metals, commodities, government bonds stock indices.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku-package.html","id":"principal-ichimoku-functions","dir":"Reference","previous_headings":"","what":"Principal ichimoku functions","title":"ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies — ichimoku-package","text":"Data & Visualization ichimoku create ichimoku object price data. plot.ichimoku / iplot plot (interactive) cloud charts ichimoku objects. archive reading/writing objects /archive files data verification. oanda retrieve price data OANDA fxTrade API. Strategies & ML strat augment ichimoku object strategy, including combined asymmetric strategies. autostrat automatically evaluate rank top-performing strategies. mlgrid generate numeric representation ichimoku cloud chart. relative produce statistical summary latest ichimoku numeric representation relative historical values. Real-time oanda_chart plot real-time ichimoku cloud charts using OANDA data. oanda_studio complete live analysis environment using OANDA data implemented R Shiny. oanda_stream / oanda_quote obtain latest live data stream / quote OANDA fxTrade API. oanda_view market overview showing relative performance constituents. oanda_orders / oanda_positions retrieve aggregate OANDA fxTrade order / position book.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies — ichimoku-package","text":"Sasaki, H. (1996), ichimoku kinkouhyou kenkyuu. Tokyo, Japan: Toushi Radar. OANDA' 'fxTrade' trademarks owned OANDA Corporation, entity unaffiliated ichimoku package, authors copyright holders.","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"ichimoku: Visualization and Tools for Ichimoku Kinko Hyo Strategies — ichimoku-package","text":"Charlie Gao charlie.gao@shikokuchuo.net (ORCID)","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"ichimoku — ichimoku","title":"ichimoku — ichimoku","text":"Create ichimoku object containing values components Ichimoku Kinko Hyo cloud chart. object encapsulates date-time index, OHLC pricing data, candle direction, cloud lines Tenkan-sen, Kijun-sen, Senkou span , Senkou span B Chikou span, well values cloud top cloud base.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ichimoku — ichimoku","text":"","code":"ichimoku(x, ticker, periods = c(9L, 26L, 52L), keep.data = FALSE, ...) # S3 method for class 'ichimoku' ichimoku(x, ticker, periods = c(9L, 26L, 52L), keep.data = FALSE, ...) # S3 method for class 'xts' ichimoku(x, ticker, periods = c(9L, 26L, 52L), keep.data = FALSE, ...) # S3 method for class 'data.frame' ichimoku(x, ticker, periods = c(9L, 26L, 52L), keep.data = FALSE, ...) # S3 method for class 'matrix' ichimoku(x, ticker, periods = c(9L, 26L, 52L), keep.data = FALSE, ...) # Default S3 method ichimoku(x, ticker, periods = c(9L, 26L, 52L), keep.data = FALSE, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ichimoku — ichimoku","text":"x data.frame compatible object, includes xts, data.table, tibble, matrix. ticker (optional) specify ticker identify instrument, otherwise set name input object. periods [default c(9L, 26L, 52L)] vector defining length periods used cloud. parameter shoud normally modified using values invalid context traditional ichimoku analysis. keep.data [default FALSE] set TRUE retain additional data present input object additional columns /attributes. ... additional arguments, instance 'holidays', passed along tradingDays calculating future cloud daily data.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ichimoku — ichimoku","text":"ichimoku object S3 classes 'ichimoku', 'xts' 'zoo'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ichimoku — ichimoku","text":"Calling ichimoku object automatically invokes print method, default produces printout data console well plot cloud chart graphical device. options, use plot() returned ichimoku object pass arguments customising chart. Use iplot() interactive charting. ichimoku object passed ichimoku(), ichimoku object re-calculated using OHLC pricing data contained within.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"ichimoku-object-specification","dir":"Reference","previous_headings":"","what":"Ichimoku Object Specification","title":"ichimoku — ichimoku","text":"Index: index(object): date-time index [POSIXct] Columns [numeric]: object$open: opening price $high: high price $low: low price $close: closing price $cd: candle direction (-1 = , 0 = flat, 1 = ) $tenkan: Tenkan-sen $kijun: Kijun-sen $senkouA: Senkou span $senkouB: Senkou span B $chikou: Chikou span $cloudT: cloud Top (max senkouA, senkouB) $cloudB: cloud Base (min senkouA, senkouB) Attributes: attributes(object)$periods: parameters used calculate cloud [integer vector length 3] $periodicity: periodicity data seconds [numeric] $ticker: instrument identifier [character]","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"ichimoku — ichimoku","text":"ichimoku() requires OHLC (else HLC) price data input calculate cloud chart values. single series price data supplied, pseudo OHLC series generated pseudo cloud chart returned. faster technical utility version function available .ichimoku use data already required format. Please refer reference vignette calling: vignette(\"reference\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ichimoku — ichimoku","text":"","code":"TKR <- sample_ohlc_data cloud <- ichimoku(TKR) cloud #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB chikou #> 2020-01-02 123.0 123.1 122.5 122.7 -1 NA NA NA NA 122.8 #> 2020-01-03 122.7 122.8 122.6 122.8 1 NA NA NA NA 122.9 #> 2020-01-06 122.8 123.4 122.4 123.3 1 NA NA NA NA 123.0 #> 2020-01-07 123.3 124.3 123.3 124.1 1 NA NA NA NA 123.9 #> 2020-01-08 124.1 124.8 124.0 124.8 1 NA NA NA NA 123.6 #> 2020-01-09 124.8 125.4 124.5 125.3 1 NA NA NA NA 122.5 #> 2020-01-10 125.3 125.3 124.8 125.2 -1 NA NA NA NA 122.6 #> 2020-01-13 125.2 125.3 125.1 125.2 0 NA NA NA NA 123.0 #> 2020-01-14 125.2 125.2 124.3 124.4 -1 123.90 NA NA NA 123.1 #> 2020-01-15 124.4 124.5 123.7 123.9 -1 123.90 NA NA NA 122.1 #> 2020-01-16 123.9 124.4 123.8 124.2 1 123.90 NA NA NA 121.9 #> 2020-01-17 124.2 124.3 123.0 123.5 -1 124.20 NA NA NA 121.1 #> 2020-01-20 123.5 123.8 123.1 123.2 -1 124.20 NA NA NA 121.4 #> 2020-01-21 123.6 123.6 123.4 123.6 0 124.20 NA NA NA 121.5 #> 2020-01-22 123.5 124.0 123.3 123.5 0 124.15 NA NA NA 121.9 #> 2020-01-23 123.5 124.5 123.3 124.3 1 124.15 NA NA NA 120.9 #> 2020-01-24 124.3 124.4 124.0 124.2 -1 124.10 NA NA NA 121.0 #> 2020-01-27 124.2 124.2 122.7 123.0 -1 123.60 NA NA NA 120.8 #> 2020-01-28 123.0 123.6 122.7 123.1 1 123.60 NA NA NA 121.2 #> 2020-01-29 123.1 123.3 123.1 123.2 1 123.60 NA NA NA 121.6 #> 2020-01-30 123.2 123.2 122.8 123.1 -1 123.60 NA NA NA 121.1 #> 2020-01-31 123.1 123.5 123.0 123.2 1 123.60 NA NA NA 122.1 #> 2020-02-03 123.2 123.3 122.6 123.0 -1 123.55 NA NA NA 122.2 #> 2020-02-04 123.0 123.1 122.6 122.9 -1 123.55 NA NA NA 122.2 #> 2020-02-05 122.9 123.2 122.6 122.8 -1 123.50 NA NA NA 122.4 #> 2020-02-06 122.8 122.9 122.8 122.8 0 123.40 123.90 NA NA 122.4 #> cloudT cloudB #> 2020-01-02 NA NA #> 2020-01-03 NA NA #> 2020-01-06 NA NA #> 2020-01-07 NA NA #> 2020-01-08 NA NA #> 2020-01-09 NA NA #> 2020-01-10 NA NA #> 2020-01-13 NA NA #> 2020-01-14 NA NA #> 2020-01-15 NA NA #> 2020-01-16 NA NA #> 2020-01-17 NA NA #> 2020-01-20 NA NA #> 2020-01-21 NA NA #> 2020-01-22 NA NA #> 2020-01-23 NA NA #> 2020-01-24 NA NA #> 2020-01-27 NA NA #> 2020-01-28 NA NA #> 2020-01-29 NA NA #> 2020-01-30 NA NA #> 2020-01-31 NA NA #> 2020-02-03 NA NA #> 2020-02-04 NA NA #> 2020-02-05 NA NA #> 2020-02-06 NA NA #> [ reached getOption(\"max.print\") -- omitted 27 rows ] kumo <- ichimoku(TKR, ticker = \"TKR Co.\", periods = c(9, 26, 52), keep.data = TRUE) summary(kumo) #> ichimoku object with dimensions (281, 13) #> #> Max: 2020-07-13 23:00:00 [139.7] #> Start: 2020-01-02 00:00:00 [123] End: 2020-12-24 00:00:00 [136] #> Min: 2020-05-12 23:00:00 [119.1] #> #> Cloud periods: 9 26 52 #> Periodicity: 1 days #> Ticker: TKR Co. print(kumo, plot = FALSE, rows = 10) #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB chikou #> 2020-01-02 123.0 123.1 122.5 122.7 -1 NA NA NA NA 122.8 #> 2020-01-03 122.7 122.8 122.6 122.8 1 NA NA NA NA 122.9 #> 2020-01-06 122.8 123.4 122.4 123.3 1 NA NA NA NA 123.0 #> 2020-01-07 123.3 124.3 123.3 124.1 1 NA NA NA NA 123.9 #> 2020-01-08 124.1 124.8 124.0 124.8 1 NA NA NA NA 123.6 #> 2020-01-09 124.8 125.4 124.5 125.3 1 NA NA NA NA 122.5 #> 2020-01-10 125.3 125.3 124.8 125.2 -1 NA NA NA NA 122.6 #> 2020-01-13 125.2 125.3 125.1 125.2 0 NA NA NA NA 123.0 #> 2020-01-14 125.2 125.2 124.3 124.4 -1 123.9 NA NA NA 123.1 #> 2020-01-15 124.4 124.5 123.7 123.9 -1 123.9 NA NA NA 122.1 #> cloudT cloudB volume #> 2020-01-02 NA NA 1875 #> 2020-01-03 NA NA 1479 #> 2020-01-06 NA NA 1792 #> 2020-01-07 NA NA 1977 #> 2020-01-08 NA NA 2239 #> 2020-01-09 NA NA 1842 #> 2020-01-10 NA NA 2548 #> 2020-01-13 NA NA 2946 #> 2020-01-14 NA NA 2796 #> 2020-01-15 NA NA 2879 #> [ reached getOption(\"max.print\") -- omitted 11 rows ] plot(kumo, theme = \"solarized\", type = \"bar\", custom = \"volume\")"},{"path":"https://shikokuchuo.net/ichimoku/reference/index.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract the Index of Ichimoku Objects — index","title":"Extract the Index of Ichimoku Objects — index","text":"Method extracting date-time index ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/index.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract the Index of Ichimoku Objects — index","text":"","code":"# S3 method for class 'ichimoku' index(x, subset, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/index.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract the Index of Ichimoku Objects — index","text":"x object class 'ichimoku'. subset integer logical value vector subset index. ... arguments passed methods.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/index.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract the Index of Ichimoku Objects — index","text":"date-time index ichimoku object vector POSIXct values.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/index.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract the Index of Ichimoku Objects — index","text":"function S3 method generic function index() class 'ichimoku'. can invoked calling index(x) object 'x' class 'ichimoku'. Subsetting specifying 'subset' parameter subsets using numerical values underlying POSIXct times results faster operation usual subset operators '['.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/index.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract the Index of Ichimoku Objects — index","text":"","code":"cloud <- ichimoku(sample_ohlc_data) index(cloud)[101:110] #> [1] \"2020-05-20 23:00:00 UTC\" \"2020-05-21 23:00:00 UTC\" #> [3] \"2020-05-24 23:00:00 UTC\" \"2020-05-25 23:00:00 UTC\" #> [5] \"2020-05-26 23:00:00 UTC\" \"2020-05-27 23:00:00 UTC\" #> [7] \"2020-05-28 23:00:00 UTC\" \"2020-05-31 23:00:00 UTC\" #> [9] \"2020-06-01 23:00:00 UTC\" \"2020-06-02 23:00:00 UTC\" index(cloud, 101:110) #> [1] \"2020-05-20 23:00:00 UTC\" \"2020-05-21 23:00:00 UTC\" #> [3] \"2020-05-24 23:00:00 UTC\" \"2020-05-25 23:00:00 UTC\" #> [5] \"2020-05-26 23:00:00 UTC\" \"2020-05-27 23:00:00 UTC\" #> [7] \"2020-05-28 23:00:00 UTC\" \"2020-05-31 23:00:00 UTC\" #> [9] \"2020-06-01 23:00:00 UTC\" \"2020-06-02 23:00:00 UTC\""},{"path":"https://shikokuchuo.net/ichimoku/reference/iplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Interactive Ichimoku Cloud Plot — iplot","title":"Interactive Ichimoku Cloud Plot — iplot","text":"Plot Ichimoku Kinko Hyo cloud charts ichimoku objects R Shiny, allowing full customisation chart elements interactive environment. Intuitive cursor infotip provides ready access data directly chart.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/iplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interactive Ichimoku Cloud Plot — iplot","text":"","code":"iplot( x, ticker, subtitle, theme = c(\"classic\", \"dark\", \"mono\", \"noguchi\", \"okabe-ito\", \"solarized\"), strat = TRUE, type = c(\"none\", \"r\", \"s\", \"bar\", \"line\"), custom, ..., launch.browser = TRUE )"},{"path":"https://shikokuchuo.net/ichimoku/reference/iplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interactive Ichimoku Cloud Plot — iplot","text":"x object class 'ichimoku'. ticker (optional) specify ticker (text) include chart heading. set, ticker saved within ichimoku object used. subtitle (optional) specify subtitle display chart title. theme [default 'classic'] choices 'dark', 'mono', 'noguchi', 'okabe-ito' 'solarized'. strat [default TRUE] ichimoku object contains strategy, periods strategy results position shaded, strategy printed chart subtitle (otherwise specified). Set FALSE turn behaviour. type [default 'none'] type sub-plot display beneath ichimoku cloud chart, choice 'none', 'r' 's' corresponding oscillator type, 'bar' 'line' custom plots. custom (optional) character string (containing regular expression) matching column name variable displayed sub-plot. Specify type = 'bar' type = 'line', otherwise type settings take precedence. ... additional parameters passed along 'options' argument shiny::shinyApp(). launch.browser [default TRUE] TRUE, system's default web browser launched automatically app started. value argument can also function call application's URL. use default Shiny viewer RStudio, please specify getOption(\"shiny.launch.browser\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/iplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Interactive Ichimoku Cloud Plot — iplot","text":"Shiny app object class 'shiny.appobj'. default arguments, Shiny app launched default browser.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/iplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Interactive Ichimoku Cloud Plot — iplot","text":"details please refer reference vignette calling: vignette(\"reference\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/iplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Interactive Ichimoku Cloud Plot — iplot","text":"","code":"if (interactive()) { # Only run examples in interactive R sessions cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") iplot(cloud) # To open in RStudio viewer instead of default browser iplot(cloud, launch.browser = getOption(\"shiny.launch.browser\")) }"},{"path":"https://shikokuchuo.net/ichimoku/reference/is.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"is.ichimoku — is.ichimoku","title":"is.ichimoku — is.ichimoku","text":"function checking object ichimoku object.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/is.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"is.ichimoku — is.ichimoku","text":"","code":"is.ichimoku(x)"},{"path":"https://shikokuchuo.net/ichimoku/reference/is.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"is.ichimoku — is.ichimoku","text":"x object.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/is.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"is.ichimoku — is.ichimoku","text":"logical value TRUE 'x' class 'ichimoku', otherwise FALSE.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/is.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"is.ichimoku — is.ichimoku","text":"","code":"cloud <- ichimoku(sample_ohlc_data) # TRUE: is.ichimoku(cloud) #> [1] TRUE # FALSE: is.ichimoku(sample_ohlc_data) #> [1] FALSE"},{"path":"https://shikokuchuo.net/ichimoku/reference/look.html","id":null,"dir":"Reference","previous_headings":"","what":"Look at Informational Attributes — look","title":"Look at Informational Attributes — look","text":"Inspect informational attributes objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/look.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Look at Informational Attributes — look","text":"","code":"look(x = .Last.value)"},{"path":"https://shikokuchuo.net/ichimoku/reference/look.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Look at Informational Attributes — look","text":"x object (optional). 'x' supplied, .Last.value used instead.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/look.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Look at Informational Attributes — look","text":"objects created ichimoku package, list attributes specific data type. objects, list non-standard attributes matrix / data.frame / xts classes, else invisible NULL none present.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/look.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Look at Informational Attributes — look","text":"Note: autostrat list attributes may accessed directly using look(x)$logret look(x)$summary.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/look.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Look at Informational Attributes — look","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") look(cloud) #> $periods #> [1] 9 26 52 #> #> $periodicity #> [1] 86400 #> #> $ticker #> [1] \"TKR\" #> stratlist <- autostrat(cloud, n = 3) #> [,1] [,2] #> Strategy \"senkouB > tenkan\" \"cloudB > tenkan\" #> --------------------- \"----------\" \"----------\" #> Strategy cuml return % 17.49 16.08 #> Per period mean ret % 0.0906 0.0838 #> Periods in market 63 51 #> Total trades 3 3 #> Average trade length 21 17 #> Trade success % 100 100 #> Worst trade ret % 3.64 3.16 #> --------------------- \"----------\" \"----------\" #> Benchmark cuml ret % 5.53 5.53 #> Per period mean ret % 0.0302 0.0302 #> Periods in market 178 178 #> --------------------- \"----------\" \"----------\" #> Direction \"long\" \"long\" #> Start 2020-04-19 23:00:00 2020-04-19 23:00:00 #> End 2020-12-23 2020-12-23 #> Ticker \"TKR\" \"TKR\" #> [,3] #> Strategy \"senkouB > kijun\" #> --------------------- \"----------\" #> Strategy cuml return % 14.1 #> Per period mean ret % 0.0741 #> Periods in market 64 #> Total trades 3 #> Average trade length 21.33 #> Trade success % 100 #> Worst trade ret % 3.49 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" look(stratlist) #> $logret #> senkouB_tenkan cloudB_tenkan senkouB_kijun cloudB_kijun low_tenkan #> 0.144869048 0.132721126 0.124552623 0.124476092 0.119988595 #> cloudB_close high_tenkan cloudB_low senkouB_close cloudT_kijun #> 0.117048881 0.112062056 0.110900734 0.110699399 0.103153955 #> senkouA_kijun senkouB_low cloudT_tenkan cloudT_high low_kijun #> 0.103077424 0.101480718 0.093961798 0.088759707 0.088503030 #> senkouB_high chikou_senkouA high_kijun senkouA_tenkan close_tenkan #> 0.086708526 0.084344426 0.083373239 0.081813876 0.079948752 #> tenkan_chikou senkouA_high cloudB_high senkouA_low senkouA_close #> 0.078961923 0.076693196 0.074642015 0.073761187 0.073712567 #> close_kijun chikou_cloudT cloudT_close kijun_chikou cloudT_low #> 0.071380845 0.069192621 0.067363085 0.066288776 0.064341171 #> chikou_cloudB chikou_close kijun_tenkan chikou_low chikou_senkouB #> 0.064291073 0.062225816 0.055091789 0.053536566 0.049139267 #> senkouA_senkouB senkouB_chikou chikou_high low_chikou high_chikou #> 0.048655509 0.045949698 0.042730532 0.041552399 0.034326207 #> close_chikou cloudB_chikou low_cloudT tenkan_kijun chikou_kijun #> 0.032863149 0.030797893 0.030747795 0.030128362 0.028800189 #> cloudT_chikou close_cloudT kijun_close senkouB_senkouA tenkan_close #> 0.025896344 0.024713830 0.023708120 0.023618778 0.023402736 #> close_senkouA low_senkouA high_cloudB high_senkouA tenkan_senkouA #> 0.021376398 0.021327779 0.020446951 0.018395770 0.013275089 #> senkouA_chikou chikou_tenkan high_senkouB kijun_low high_cloudT #> 0.010744539 0.010161327 0.008380439 0.006585935 0.006329258 #> tenkan_cloudT kijun_high low_senkouB tenkan_high kijun_senkouA #> 0.001127167 -0.003436078 -0.006391752 -0.007150571 -0.007988459 #> kijun_cloudT low_cloudB tenkan_low close_senkouB close_cloudB #> -0.008064990 -0.015811768 -0.015890560 -0.018622484 -0.021959916 #> tenkan_cloudB kijun_cloudB kijun_senkouB tenkan_senkouB #> -0.037632160 -0.040858512 -0.040935043 -0.049780083 #> #> $summary #> [,1] [,2] #> Strategy \"senkouB > tenkan\" \"cloudB > tenkan\" #> --------------------- \"----------\" \"----------\" #> Strategy cuml return % 17.49 16.08 #> Per period mean ret % 0.0906 0.0838 #> Periods in market 63 51 #> Total trades 3 3 #> Average trade length 21 17 #> Trade success % 100 100 #> Worst trade ret % 3.64 3.16 #> --------------------- \"----------\" \"----------\" #> Benchmark cuml ret % 5.53 5.53 #> Per period mean ret % 0.0302 0.0302 #> Periods in market 178 178 #> --------------------- \"----------\" \"----------\" #> Direction \"long\" \"long\" #> Start 2020-04-19 23:00:00 2020-04-19 23:00:00 #> End 2020-12-23 2020-12-23 #> Ticker \"TKR\" \"TKR\" #> [,3] #> Strategy \"senkouB > kijun\" #> --------------------- \"----------\" #> Strategy cuml return % 14.1 #> Per period mean ret % 0.0741 #> Periods in market 64 #> Total trades 3 #> Average trade length 21.33 #> Trade success % 100 #> Worst trade ret % 3.49 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> strat <- stratlist[[1]] look(strat) #> $periods #> [1] 9 26 52 #> #> $periodicity #> [1] 86400 #> #> $ticker #> [1] \"TKR\" #> #> $strat #> [,1] #> Strategy \"senkouB > tenkan\" #> --------------------- \"----------\" #> Strategy cuml return % 17.49 #> Per period mean ret % 0.0906 #> Periods in market 63 #> Total trades 3 #> Average trade length 21 #> Trade success % 100 #> Worst trade ret % 3.64 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" #> grid <- mlgrid(cloud) look(grid) #> $y #> [1] \"logret\" #> #> $k #> [1] 1 #> #> $direction #> [1] \"long\" #> #> $type #> [1] \"boolean\" #> #> $ticker #> [1] \"TKR\" #> #> $means #> [1] NA #> #> $sdevs #> [1] NA #> if (FALSE) { # \\dontrun{ # OANDA API key required to run this example prices <- oanda(\"USD_JPY\") look(prices) } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/matrix_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert matrix to data.frame — matrix_df","title":"Convert matrix to data.frame — matrix_df","text":"optimised 'matrix' 'data.frame' constructor.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/matrix_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert matrix to data.frame — matrix_df","text":"","code":"matrix_df(x, keep.attrs = FALSE)"},{"path":"https://shikokuchuo.net/ichimoku/reference/matrix_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert matrix to data.frame — matrix_df","text":"x matrix. keep.attrs [default FALSE] set TRUE, preserve custom attributes set original object.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/matrix_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert matrix to data.frame — matrix_df","text":"'data.frame' object. matrix row names, retained dataframe.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/matrix_df.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert matrix to data.frame — matrix_df","text":"optimised data.frame constructors used internally within package made available utilities. Please note data validation checking performed.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/matrix_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert matrix to data.frame — matrix_df","text":"","code":"cloud <- ichimoku(sample_ohlc_data) mcloud <- as.matrix(cloud) df <- matrix_df(mcloud) str(df) #> 'data.frame':\t281 obs. of 12 variables: #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... str(rownames(df)) #> chr [1:281] \"2020-01-02\" \"2020-01-03\" \"2020-01-06\" \"2020-01-07\" ..."},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":null,"dir":"Reference","previous_headings":"","what":"mlgrid Numeric Representation — mlgrid","title":"mlgrid Numeric Representation — mlgrid","text":"Create grid ichimoku indicator conditions next period returns. grid facilitates comparison strategy returns provides basis use machine learning applications. Translates visual representation relationship cloud chart elements numerical format analysis.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"mlgrid Numeric Representation — mlgrid","text":"","code":"mlgrid( x, y = c(\"logret\", \"ret\", \"none\"), k = 1L, dir = c(\"long\", \"short\"), type = c(\"boolean\", \"numeric\", \"z-score\"), format = c(\"dataframe\", \"matrix\"), unique = TRUE, expr = list() )"},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"mlgrid Numeric Representation — mlgrid","text":"x ichimoku object. y [default 'logret'] choose target variable 'logret' (log returns), 'ret' (discrete returns), 'none'. k [default 1L] number periods time horizon calculate target variable 'y'. dir [default 'long'] trade direction, either 'long' 'short'. type [default 'boolean'] choose 'boolean', 'numeric' 'z-score'. 'boolean' creates grid dummy variables ichimoku indicator conditions form 1 c1 > c2, 0 otherwise. 'numeric' creates grid numeric difference c1 - c2. 'z-score' standardises numeric grid mean standard deviation feature. format [default 'dataframe'] select either 'dataframe' 'matrix' format returned object. unique [default TRUE] return unique combinations c1 c2. Set FALSE return c1 > c2 c2 > c1. expr [default list()] (advanced use ) named list quoted language objects expressions, evaluated internally within function, referencing intermediate objects : 'core', coredata matrix ichimoku object, 'xlen' number observations, function parameters etc. evaluated expression must return vector length 'xlen' inclusion grid.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"mlgrid Numeric Representation — mlgrid","text":"data.frame matrix 'tidy' format one observation per row one feature per column target 'y' first column (unless set 'none'). 'y' 'k' parameters, trade direction grid type set attributes, 'means' 'sdevs' also populated type 'z-score' return mean standard deviation column. view , use look returned object.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"mlgrid Numeric Representation — mlgrid","text":"date-time index corresponds indicator condition met close period. return k-period return achieved transacting immediately following opening price next opening price. valid combinations included. excludes combination involving 'open' effect lagged indicator contemporaneous. following trivial highly-collinear pairs also excluded: (high, close), (low, close), (low, high), (cloudTop, Senkou ), (cloudBase, senkou ), (cloudTop, senkouB), (cloudBase, senkouB), (cloudBase, cloudTop).","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"mlgrid Numeric Representation — mlgrid","text":"Please refer strategies vignette calling: vignette(\"strategies\", package = \"ichimoku\")","code":""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/reference/mlgrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"mlgrid Numeric Representation — mlgrid","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") grid <- mlgrid(cloud, y = \"ret\", k = 2, dir = \"short\", type = \"z-score\") str(grid) #> 'data.frame':\t152 obs. of 38 variables: #> $ y : num -0.00645 0.00242 -0.00321 -0.00242 -0.0016 ... #> $ chikou_close : num -1.086 -0.79 -0.79 -0.856 -0.757 ... #> $ chikou_high : num -0.964 -0.85 -0.768 -0.752 -0.719 ... #> $ chikou_low : num -1.061 -0.866 -0.85 -0.898 -0.833 ... #> $ chikou_tenkan : num -0.783 -0.67 -0.751 -0.945 -0.88 ... #> $ chikou_kijun : num -0.631 -0.514 -0.498 -0.531 -0.431 ... #> $ chikou_senkouA : num -0.326 -0.218 -0.203 -0.241 -0.169 ... #> $ chikou_senkouB : num -0.709 -0.58 -0.562 -0.599 -0.489 ... #> $ chikou_cloudT : num -0.345 -0.238 -0.222 -0.253 -0.161 ... #> $ chikou_cloudB : num -0.714 -0.581 -0.562 -0.609 -0.519 ... #> $ close_tenkan : num 0.783 1.092 1.036 0.643 0.615 ... #> $ close_kijun : num -0.527 -0.313 -0.237 -0.298 -0.114 ... #> $ close_senkouA : num -0.724 -0.606 -0.64 -0.757 -0.673 ... #> $ close_senkouB : num -0.841 -0.711 -0.692 -0.729 -0.618 ... #> $ close_cloudT : num -0.62 -0.499 -0.534 -0.655 -0.568 ... #> $ close_cloudB : num -0.983 -0.852 -0.834 -0.871 -0.759 ... #> $ high_tenkan : num 0.698 0.793 0.856 0.412 0.38 ... #> $ high_kijun : num -0.643 -0.548 -0.404 -0.468 -0.277 ... #> $ high_senkouA : num -0.784 -0.733 -0.733 -0.852 -0.767 ... #> $ high_senkouB : num -0.904 -0.847 -0.791 -0.829 -0.716 ... #> $ high_cloudT : num -0.682 -0.629 -0.629 -0.753 -0.664 ... #> $ high_cloudB : num -1.047 -0.99 -0.934 -0.971 -0.859 ... #> $ low_tenkan : num 0.362 1.029 1.492 0.855 0.652 ... #> $ low_kijun : num -0.7564 -0.3619 -0.0129 -0.195 -0.1039 ... #> $ low_senkouA : num -0.846 -0.63 -0.513 -0.696 -0.663 ... #> $ low_senkouB : num -0.976 -0.736 -0.552 -0.662 -0.607 ... #> $ low_cloudT : num -0.751 -0.526 -0.405 -0.595 -0.56 ... #> $ low_cloudB : num -1.113 -0.873 -0.689 -0.799 -0.744 ... #> $ tenkan_kijun : num -1.283 -1.221 -1.077 -0.871 -0.604 ... #> $ tenkan_senkouA : num -1.041 -1.014 -1.032 -1.032 -0.932 ... #> $ tenkan_senkouB : num -1.145 -1.116 -1.078 -0.981 -0.855 ... #> $ tenkan_cloudT : num -0.948 -0.919 -0.938 -0.938 -0.833 ... #> $ tenkan_cloudB : num -1.29 -1.261 -1.222 -1.125 -0.999 ... #> $ kijun_senkouA : num -0.706 -0.706 -0.829 -0.965 -0.992 ... #> $ kijun_senkouB : num -0.666 -0.666 -0.702 -0.702 -0.702 ... #> $ kijun_cloudT : num -0.507 -0.507 -0.63 -0.767 -0.795 ... #> $ kijun_cloudB : num -0.909 -0.909 -0.948 -0.948 -0.948 ... #> $ senkouA_senkouB: num -0.0681 -0.0681 0.0317 0.198 0.2312 ... #> - attr(*, \"y\")= chr \"ret\" #> - attr(*, \"k\")= int 2 #> - attr(*, \"direction\")= chr \"short\" #> - attr(*, \"type\")= chr \"z-score\" #> - attr(*, \"ticker\")= chr \"TKR\" #> - attr(*, \"means\")= num [1:37] 1.414 0.691 2.222 1.646 2.241 ... #> - attr(*, \"sdevs\")= num [1:37] 6.09 6.11 6.15 6.19 6.01 ... custom <- mlgrid(cloud, type = \"numeric\", expr = list(cd = quote(core[, \"cd\"]))) str(custom) #> 'data.frame':\t153 obs. of 39 variables: #> $ y : num 0.007273 -0.000805 -0.001613 0.004831 -0.002413 ... #> $ chikou_close : num -5.2 -3.4 -3.4 -3.8 -3.2 ... #> $ chikou_high : num -5.2 -4.5 -4 -3.9 -3.7 ... #> $ chikou_low : num -4.3 -3.1 -3 -3.3 -2.9 ... #> $ chikou_tenkan : num -3.2 -2.5 -3 -4.2 -3.8 ... #> $ chikou_kijun : num -1.55 -0.85 -0.75 -0.95 -0.35 ... #> $ chikou_senkouA : num 1.3 2 2.1 1.85 2.33 ... #> $ chikou_senkouB : num 0.4 1.1 1.2 1 1.6 ... #> $ chikou_cloudT : num 0.4 1.1 1.2 1 1.6 ... #> $ chikou_cloudB : num 1.3 2 2.1 1.85 2.33 ... #> $ close_tenkan : num 1.9 2.45 2.35 1.65 1.6 ... #> $ close_kijun : num -0.5 0.2 0.45 0.25 0.85 ... #> $ close_senkouA : num -2.38 -1.67 -1.88 -2.57 -2.08 ... #> $ close_senkouB : num -1.55 -0.85 -0.75 -0.95 -0.35 ... #> $ close_cloudT : num -2.38 -1.67 -1.88 -2.57 -2.08 ... #> $ close_cloudB : num -1.55 -0.85 -0.75 -0.95 -0.35 ... #> $ high_tenkan : num 2.3 2.45 2.55 1.85 1.8 ... #> $ high_kijun : num -0.1 0.2 0.65 0.45 1.05 ... #> $ high_senkouA : num -1.97 -1.67 -1.67 -2.38 -1.88 ... #> $ high_senkouB : num -1.15 -0.85 -0.55 -0.75 -0.15 ... #> $ high_cloudT : num -1.97 -1.67 -1.67 -2.38 -1.88 ... #> $ high_cloudB : num -1.15 -0.85 -0.55 -0.75 -0.15 ... #> $ low_tenkan : num 0.3 1.45 2.25 1.15 0.8 ... #> $ low_kijun : num -2.1 -0.8 0.35 -0.25 0.05 ... #> $ low_senkouA : num -3.97 -2.67 -1.97 -3.07 -2.88 ... #> $ low_senkouB : num -3.15 -1.85 -0.85 -1.45 -1.15 ... #> $ low_cloudT : num -3.97 -2.67 -1.97 -3.07 -2.88 ... #> $ low_cloudB : num -3.15 -1.85 -0.85 -1.45 -1.15 ... #> $ tenkan_kijun : num -2.4 -2.25 -1.9 -1.4 -0.75 ... #> $ tenkan_senkouA : num -4.27 -4.12 -4.22 -4.22 -3.67 ... #> $ tenkan_senkouB : num -3.45 -3.3 -3.1 -2.6 -1.95 ... #> $ tenkan_cloudT : num -4.27 -4.12 -4.22 -4.22 -3.67 ... #> $ tenkan_cloudB : num -3.45 -3.3 -3.1 -2.6 -1.95 ... #> $ kijun_senkouA : num -1.88 -1.88 -2.33 -2.83 -2.93 ... #> $ kijun_senkouB : num -1.05 -1.05 -1.2 -1.2 -1.2 ... #> $ kijun_cloudT : num -1.88 -1.88 -2.33 -2.83 -2.93 ... #> $ kijun_cloudB : num -1.05 -1.05 -1.2 -1.2 -1.2 ... #> $ senkouA_senkouB: num 0.825 0.825 1.125 1.625 1.725 ... #> $ cd : num 1 1 -1 -1 1 -1 1 1 1 1 ... #> - attr(*, \"y\")= chr \"logret\" #> - attr(*, \"k\")= int 1 #> - attr(*, \"direction\")= chr \"long\" #> - attr(*, \"type\")= chr \"numeric\" #> - attr(*, \"ticker\")= chr \"TKR\" #> - attr(*, \"means\")= logi NA #> - attr(*, \"sdevs\")= logi NA"},{"path":"https://shikokuchuo.net/ichimoku/reference/more.html","id":null,"dir":"Reference","previous_headings":"","what":"Print More Rows of Ichimoku Objects — more","title":"Print More Rows of Ichimoku Objects — more","text":"calling invoking default print method ichimoku objects, console output display -- omitted x rows entire data fit -screen. Use () display rows.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/more.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print More Rows of Ichimoku Objects — more","text":"","code":"more(rows)"},{"path":"https://shikokuchuo.net/ichimoku/reference/more.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print More Rows of Ichimoku Objects — more","text":"rows (optional) specify number rows print; defaults rows supplied non-numeric.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/more.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print More Rows of Ichimoku Objects — more","text":"ichimoku object contained .Last.value (invisibly) else invisible NULL (.Last.value ichimoku object). ichimoku object data printed console.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/more.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print More Rows of Ichimoku Objects — more","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") cloud #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB chikou #> 2020-01-02 123.0 123.1 122.5 122.7 -1 NA NA NA NA 122.8 #> 2020-01-03 122.7 122.8 122.6 122.8 1 NA NA NA NA 122.9 #> 2020-01-06 122.8 123.4 122.4 123.3 1 NA NA NA NA 123.0 #> 2020-01-07 123.3 124.3 123.3 124.1 1 NA NA NA NA 123.9 #> 2020-01-08 124.1 124.8 124.0 124.8 1 NA NA NA NA 123.6 #> 2020-01-09 124.8 125.4 124.5 125.3 1 NA NA NA NA 122.5 #> 2020-01-10 125.3 125.3 124.8 125.2 -1 NA NA NA NA 122.6 #> 2020-01-13 125.2 125.3 125.1 125.2 0 NA NA NA NA 123.0 #> 2020-01-14 125.2 125.2 124.3 124.4 -1 123.90 NA NA NA 123.1 #> 2020-01-15 124.4 124.5 123.7 123.9 -1 123.90 NA NA NA 122.1 #> 2020-01-16 123.9 124.4 123.8 124.2 1 123.90 NA NA NA 121.9 #> 2020-01-17 124.2 124.3 123.0 123.5 -1 124.20 NA NA NA 121.1 #> 2020-01-20 123.5 123.8 123.1 123.2 -1 124.20 NA NA NA 121.4 #> 2020-01-21 123.6 123.6 123.4 123.6 0 124.20 NA NA NA 121.5 #> 2020-01-22 123.5 124.0 123.3 123.5 0 124.15 NA NA NA 121.9 #> 2020-01-23 123.5 124.5 123.3 124.3 1 124.15 NA NA NA 120.9 #> 2020-01-24 124.3 124.4 124.0 124.2 -1 124.10 NA NA NA 121.0 #> 2020-01-27 124.2 124.2 122.7 123.0 -1 123.60 NA NA NA 120.8 #> 2020-01-28 123.0 123.6 122.7 123.1 1 123.60 NA NA NA 121.2 #> 2020-01-29 123.1 123.3 123.1 123.2 1 123.60 NA NA NA 121.6 #> 2020-01-30 123.2 123.2 122.8 123.1 -1 123.60 NA NA NA 121.1 #> 2020-01-31 123.1 123.5 123.0 123.2 1 123.60 NA NA NA 122.1 #> 2020-02-03 123.2 123.3 122.6 123.0 -1 123.55 NA NA NA 122.2 #> 2020-02-04 123.0 123.1 122.6 122.9 -1 123.55 NA NA NA 122.2 #> 2020-02-05 122.9 123.2 122.6 122.8 -1 123.50 NA NA NA 122.4 #> 2020-02-06 122.8 122.9 122.8 122.8 0 123.40 123.90 NA NA 122.4 #> cloudT cloudB #> 2020-01-02 NA NA #> 2020-01-03 NA NA #> 2020-01-06 NA NA #> 2020-01-07 NA NA #> 2020-01-08 NA NA #> 2020-01-09 NA NA #> 2020-01-10 NA NA #> 2020-01-13 NA NA #> 2020-01-14 NA NA #> 2020-01-15 NA NA #> 2020-01-16 NA NA #> 2020-01-17 NA NA #> 2020-01-20 NA NA #> 2020-01-21 NA NA #> 2020-01-22 NA NA #> 2020-01-23 NA NA #> 2020-01-24 NA NA #> 2020-01-27 NA NA #> 2020-01-28 NA NA #> 2020-01-29 NA NA #> 2020-01-30 NA NA #> 2020-01-31 NA NA #> 2020-02-03 NA NA #> 2020-02-04 NA NA #> 2020-02-05 NA NA #> 2020-02-06 NA NA #> [ reached getOption(\"max.print\") -- omitted 27 rows ] more(25) more()"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Price Data — oanda","title":"OANDA Price Data — oanda","text":"Retrieve price data major currencies, metals, commodities, government bonds stock indices OANDA fxTrade API.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Price Data — oanda","text":"","code":"oanda( instrument, granularity = c(\"D\", \"W\", \"M\", \"H12\", \"H8\", \"H6\", \"H4\", \"H3\", \"H2\", \"H1\", \"M30\", \"M15\", \"M10\", \"M5\", \"M4\", \"M2\", \"M1\", \"S30\", \"S15\", \"S10\", \"S5\"), count = NULL, from = NULL, to = NULL, price = c(\"M\", \"B\", \"A\"), server, apikey, quietly )"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Price Data — oanda","text":"instrument string containing base currency quote currency delimited '_' '-' (e.g. \"USD_JPY\" \"usd-jpy\"). Use oanda_instruments function return list valid instruments. granularity [default \"D\"] granularity price data fetch, one \"M\", \"W\", \"D\", \"H12\", \"H8\", \"H6\", \"H4\", \"H3\", \"H2\", \"H1\", \"M30\", \"M15\", \"M10\", \"M5\", \"M4\", \"M2\", \"M1\", \"S30\", \"S15\", \"S10\", \"S5\". count (optional) number periods return. API supports maximum 5000 individual request, defaults 500 specified. '' '' specified, 'count' ignored, time range combined 'granularity' determine number periods return. (optional) start time range fetch price data, format convertible POSIXct .POSIXct(), example \"2020-02-01\". (optional) end time range fetch price data, format convertible POSIXct .POSIXct(), example \"2020-06-30\". price [default \"M\"] pricing component, one \"M\" (midpoint), \"B\" (bid) \"\" (ask). server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified. quietly (optional) set TRUE, suppress printing auxiliary output console return quietly.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Price Data — oanda","text":"data.frame containing price data requested.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Price Data — oanda","text":"function queries OANDA fxTrade API. Requires fxTrade account OANDA https://www.oanda.com/forex-trading/. already hold live account, may register OANDA fxTrade practice / demo account. link OANDA fxTrade account profile page 'Manage API Access' (Account -> Services -> Manage API Access). , personal access token use OANDA API can generated, well revoked. oanda_set_key function can used save API key system credential store automatically recognised future (requires 'keyring' package installed).","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"OANDA Price Data — oanda","text":"Please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\"). 'OANDA' 'fxTrade' trademarks owned OANDA Corporation, entity unaffiliated ichimoku package.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Price Data — oanda","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run these examples prices <- oanda(\"USD_JPY\") ichimoku(prices) oanda(\"EUR_JPY\", granularity = \"H1\", count = 250, from = \"2020-02-01\", price = \"B\") } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Real-time Cloud Charts — oanda_chart","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"Plot real-time Ichimoku Kinko Hyo cloud charts major currencies, metals, commodities, government bonds stock indices using OANDA fxTrade API data.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"","code":"oanda_chart( instrument, granularity = c(\"D\", \"W\", \"M\", \"H12\", \"H8\", \"H6\", \"H4\", \"H3\", \"H2\", \"H1\", \"M30\", \"M15\", \"M10\", \"M5\", \"M4\", \"M2\", \"M1\", \"S30\", \"S15\", \"S10\", \"S5\"), refresh = 5, count = 250, price = c(\"M\", \"B\", \"A\"), theme = c(\"classic\", \"dark\", \"mono\", \"noguchi\", \"okabe-ito\", \"solarized\"), type = c(\"none\", \"r\", \"s\"), limit, server, apikey, ..., periods = c(9L, 26L, 52L) )"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"instrument string containing base currency quote currency delimited '_' '-' (e.g. \"USD_JPY\" \"usd-jpy\"). Use oanda_instruments function return list valid instruments. granularity [default \"D\"] granularity price data fetch, one \"M\", \"W\", \"D\", \"H12\", \"H8\", \"H6\", \"H4\", \"H3\", \"H2\", \"H1\", \"M30\", \"M15\", \"M10\", \"M5\", \"M4\", \"M2\", \"M1\", \"S30\", \"S15\", \"S10\", \"S5\". refresh [default 5] data refresh interval seconds, minimum 1. count [default 250] number periods return. API supports maximum 5000. Note fewer periods actually shown chart ensure full cloud always displayed. price [default \"M\"] pricing component, one \"M\" (midpoint), \"B\" (bid) \"\" (ask). theme [default 'classic'] choices 'dark', 'mono', 'noguchi', 'okabe-ito' 'solarized'. Alternatively, supply vector 12 colour values (hex codes names) user-defined theme. type [default 'none'] type sub-plot display beneath ichimoku cloud chart, choice 'none', 'r' 's' corresponding oscillator type. limit (optional) specify time seconds limit session. session end data returned automatically specified time elapsed. server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified. ... additional arguments passed along ichimoku calculating ichimoku cloud autoplot set chart parameters. periods [default c(9L, 26L, 52L)] vector defining length periods used cloud. parameter shoud normally modified using values invalid context traditional ichimoku analysis.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"ichimoku object underlying chart (invisibly) function exit. plot ichimoku chart price data requested output graphical device refresh interval.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"function polls OANDA fxTrade API latest live prices updates plot graphical device refresh interval. Use 'Esc' key stop updating. access underlying data, assign function object, example: cloud <- oanda_chart(\"USD_JPY\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"Please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_chart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Real-time Cloud Charts — oanda_chart","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run these examples oanda_chart(\"USD_JPY\") oanda_chart(\"EUR_JPY\", granularity = \"H1\", refresh = 3, count = 300, price = \"B\", theme = \"mono\") # Save data underlying chart at time of function exit cloud <- oanda_chart(\"USD_JPY\") } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_instruments.html","id":null,"dir":"Reference","previous_headings":"","what":"Available OANDA Instruments — oanda_instruments","title":"Available OANDA Instruments — oanda_instruments","text":"Return list instruments including major currencies, metals, commodities, government bonds stock indices pricing data available OANDA fxTrade API.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_instruments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Available OANDA Instruments — oanda_instruments","text":"","code":"oanda_instruments(server, apikey)"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_instruments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Available OANDA Instruments — oanda_instruments","text":"server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_instruments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Available OANDA Instruments — oanda_instruments","text":"data.frame containing instrument name, full display name, type.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_instruments.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Available OANDA Instruments — oanda_instruments","text":"function returns data.frame listing instrument names available account associated supplied OANDA fxTrade API key. details please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_instruments.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Available OANDA Instruments — oanda_instruments","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run this example oanda_instruments() } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_orders.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Order Book — oanda_orders","title":"OANDA Order Book — oanda_orders","text":"Provides summary aggregate orders posted OANDA fxTrade clients price level.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_orders.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Order Book — oanda_orders","text":"","code":"oanda_orders(instrument, time, server, apikey)"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_orders.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Order Book — oanda_orders","text":"instrument string containing base currency quote currency delimited '_' '-' (e.g. \"USD_JPY\" \"usd-jpy\"). Use oanda_instruments function return list valid instruments. time (optional) time retrieve order book, format convertible POSIXct .POSIXct(). specified, recent order book retrieved. server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_orders.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Order Book — oanda_orders","text":"Invisibly, data frame order book parameters saved attributes. chart showing percentage long short orders price level output graphical device.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_orders.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Order Book — oanda_orders","text":"feature implemented OANDA certain major currency pairs considered experimental. Note: certain orders placed far market price, interquartile range order levels shown chart. returned data frame however contain entire order book. details please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_orders.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Order Book — oanda_orders","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run this example oanda_orders(\"USD_JPY\") } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_positions.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Position Book — oanda_positions","title":"OANDA Position Book — oanda_positions","text":"Provides summary aggregate positions held OANDA fxTrade clients price level.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_positions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Position Book — oanda_positions","text":"","code":"oanda_positions(instrument, time, server, apikey)"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_positions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Position Book — oanda_positions","text":"instrument string containing base currency quote currency delimited '_' '-' (e.g. \"USD_JPY\" \"usd-jpy\"). Use oanda_instruments function return list valid instruments. time (optional) time retrieve position book, format convertible POSIXct .POSIXct(). specified, recent position book retrieved. server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_positions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Position Book — oanda_positions","text":"Invisibly, data frame position book parameters saved attributes. chart showing percentage long short positions price level output graphical device.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_positions.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Position Book — oanda_positions","text":"feature implemented OANDA certain major currency pairs considered experimental. details please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_positions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Position Book — oanda_positions","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run this example oanda_positions(\"USD_JPY\") } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_quote.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Quote Latest Price — oanda_quote","title":"OANDA Quote Latest Price — oanda_quote","text":"Provides single line price quote instrument.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_quote.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Quote Latest Price — oanda_quote","text":"","code":"oanda_quote(instrument, price = c(\"M\", \"B\", \"A\"), server, apikey)"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_quote.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Quote Latest Price — oanda_quote","text":"instrument string containing base currency quote currency delimited '_' '-' (e.g. \"USD_JPY\" \"usd-jpy\"). Use oanda_instruments function return list valid instruments. price [default \"M\"] pricing component, one \"M\" (midpoint), \"B\" (bid) \"\" (ask). server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_quote.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Quote Latest Price — oanda_quote","text":"Invisible NULL. instrument, timestamp, daily open, high, low last prices, percentage change open, pricing component (M mid, B bid, ask) output console.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_quote.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Quote Latest Price — oanda_quote","text":"function designed interactive use. details please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_quote.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Quote Latest Price — oanda_quote","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run this example oanda_quote(\"USD_JPY\") } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_set_key.html","id":null,"dir":"Reference","previous_headings":"","what":"Set OANDA fxTrade API Key — oanda_set_key","title":"Set OANDA fxTrade API Key — oanda_set_key","text":"Save OANDA fxTrade API key (personal access token) system credential store.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_set_key.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set OANDA fxTrade API Key — oanda_set_key","text":"","code":"oanda_set_key()"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_set_key.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set OANDA fxTrade API Key — oanda_set_key","text":"Invisible NULL. key set default keyring service name 'OANDA_API_KEY' practice accounts 'OANDA_LIVE_KEY' live accounts.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_set_key.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set OANDA fxTrade API Key — oanda_set_key","text":"key read interactively. Separate keys can set practice live accounts - please choose correct account type prompted. function needs called set key; need called session. function dependency 'keyring' package.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_set_key.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"Set OANDA fxTrade API Key — oanda_set_key","text":"Please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_set_key.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set OANDA fxTrade API Key — oanda_set_key","text":"","code":"if (interactive()) { # Only run example in interactive R sessions oanda_set_key() }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Streaming Data — oanda_stream","title":"OANDA Streaming Data — oanda_stream","text":"Stream live price liquidity data major currencies, metals, commodities, government bonds stock indices OANDA fxTrade Streaming API.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Streaming Data — oanda_stream","text":"","code":"oanda_stream(instrument, display = 8L, limit, server, apikey)"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Streaming Data — oanda_stream","text":"instrument string containing base currency quote currency delimited '_' '-' (e.g. \"USD_JPY\" \"usd-jpy\"). Use oanda_instruments function return list valid instruments. display [default 8L] integer rows data display console one time. limit (optional) specify time seconds limit streaming session. session end data returned automatically specified time elapsed. server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Streaming Data — oanda_stream","text":"Returned invisibly, dataframe containing data streaming session function exit. latest rows dataframe printed console, governed 'display' argument.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Streaming Data — oanda_stream","text":"function connects OANDA fxTrade Streaming API. Send interrupt using 'Esc' key 'Ctrl+c' stop stream return session data. Note: messages type 'PRICE' processed. Messages type 'HEARTBEAT' consisting timestamp discarded.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"streaming-data","dir":"Reference","previous_headings":"","what":"Streaming Data","title":"OANDA Streaming Data — oanda_stream","text":"Summarised streaming API documentation: Pricing stream include every single price created Account 4 prices sent per second (every 250 milliseconds) instrument one price created 250 millisecond window, price effect end window sent means periods rapid price movement, every price sent Pricing windows different connections stream aligned way (e.g. top second) means periods rapid price movement, different prices may observed depending alignment connection","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"OANDA Streaming Data — oanda_stream","text":"Please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_stream.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Streaming Data — oanda_stream","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run this example data <- oanda_stream(\"USD_JPY\", display = 8L) } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA Studio Interactive Live Analysis — oanda_studio","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"Interactive fully-customisable R Shiny environment providing real-time Ichimoku Kinko Hyo cloud charts major currencies, metals, commodities, government bonds stock indices using OANDA fxTrade API data. Intuitive cursor infotip provides ready access data directly chart.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"","code":"oanda_studio( instrument = \"USD_JPY\", granularity = c(\"D\", \"W\", \"M\", \"H12\", \"H8\", \"H6\", \"H4\", \"H3\", \"H2\", \"H1\", \"M30\", \"M15\", \"M10\", \"M5\", \"M4\", \"M2\", \"M1\", \"S30\", \"S15\", \"S10\", \"S5\"), refresh = 5, count = 300, price = c(\"M\", \"B\", \"A\"), theme = c(\"classic\", \"dark\", \"mono\", \"noguchi\", \"okabe-ito\", \"solarized\"), type = c(\"none\", \"r\", \"s\"), server, apikey, new.process = FALSE, ..., launch.browser = TRUE, periods = c(9L, 26L, 52L) )"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"instrument [default 'USD_JPY'] string containing base currency quote currency delimited '_'. Use oanda_instruments function return list valid instruments. granularity [default \"D\"] granularity price data fetch, one \"M\", \"W\", \"D\", \"H12\", \"H8\", \"H6\", \"H4\", \"H3\", \"H2\", \"H1\", \"M30\", \"M15\", \"M10\", \"M5\", \"M4\", \"M2\", \"M1\", \"S30\", \"S15\", \"S10\", \"S5\". refresh [default 5] data refresh interval seconds, minimum 1. count [default 300] number periods return, 100 800. Note fewer periods actually shown chart ensure full cloud always displayed. price [default \"M\"] pricing component, one \"M\" (midpoint), \"B\" (bid) \"\" (ask). theme [default 'original'] alternative choices 'conceptual', 'dark', 'fresh', 'mono', 'solarized'. type [default 'none'] type sub-plot display beneath ichimoku cloud chart, choice 'none', 'r' 's' corresponding oscillator type. server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified. new.process [default FALSE] TRUE, start shiny session new R process, unblocking current process allowing continued use R console. ... additional arguments passed along ichimoku calculating ichimoku cloud, autoplot set chart parameters, 'options' argument shiny::shinyApp(). launch.browser [default TRUE] TRUE, system's default web browser launched automatically app started. value argument can also function call application's URL. use default Shiny viewer RStudio, please specify getOption(\"shiny.launch.browser\"). periods [default c(9L, 26L, 52L)] vector defining length periods used cloud. parameter shoud normally modified using values invalid context traditional ichimoku analysis.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"Invisible NULL, 'mirai' 'new.process' specified TRUE. default arguments, Shiny app launched default browser.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"function polls OANDA fxTrade API latest prices updates customisable reactive Shiny app refresh interval.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"Please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_studio.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA Studio Interactive Live Analysis — oanda_studio","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run these examples oanda_studio() # To open in RStudio viewer instead of default browser oanda_studio(launch.browser = getOption(\"shiny.launch.browser\")) } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_switch.html","id":null,"dir":"Reference","previous_headings":"","what":"Switch Default OANDA Server — oanda_switch","title":"Switch Default OANDA Server — oanda_switch","text":"Switch default OANDA fxTrade server 'practice' 'live' vice versa. Settings persist current session .","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_switch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Switch Default OANDA Server — oanda_switch","text":"","code":"oanda_switch()"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_switch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Switch Default OANDA Server — oanda_switch","text":"Invisible NULL. message informs resulting default server setting.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_switch.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Switch Default OANDA Server — oanda_switch","text":"default server start new session practice server. Call function switch live server. function can used toggle practice live servers. cached variables API key, account instruments list cleared time function called. details please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_switch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Switch Default OANDA Server — oanda_switch","text":"","code":"oanda_switch() #> Default OANDA server switched to 'live' oanda_switch() #> Default OANDA server switched to 'practice'"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_view.html","id":null,"dir":"Reference","previous_headings":"","what":"OANDA View Market Performance — oanda_view","title":"OANDA View Market Performance — oanda_view","text":"Provides snapshot overview markets intraday basis, showing relative performance individual constituents.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_view.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"OANDA View Market Performance — oanda_view","text":"","code":"oanda_view( market = c(\"allfx\", \"bonds\", \"commodities\", \"fx\", \"metals\", \"stocks\"), price = c(\"M\", \"B\", \"A\"), server, apikey )"},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_view.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"OANDA View Market Performance — oanda_view","text":"market string specifying market: 'allfx' available currencies, 'bonds' government bonds, 'commodities' commodities, 'fx' major currency pairs, 'metals' metals 'stocks' global stock markets. price [default \"M\"] pricing component, one \"M\" (midpoint), \"B\" (bid) \"\" (ask). server (optional) specify \"practice\" \"live\" server according account type held. specified, default \"practice\", unless changed oanda_switch. apikey (optional) string containing OANDA fxTrade API key (personal access token), function returns string. need specified already stored environment variable OANDA_API_KEY oanda_set_key. Can also entered interactively specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_view.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"OANDA View Market Performance — oanda_view","text":"data.frame containing daily open, high, low last prices, along percentage price change open, ordered percentage change. instrument names set row names. first timestamp retrieved pricing component printed console well saved attributes dataframe. dataframe also printed console.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_view.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"OANDA View Market Performance — oanda_view","text":"function designed interactive use. details please refer OANDA fxTrade API vignette calling: vignette(\"xoanda\", package = \"ichimoku\").","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/oanda_view.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"OANDA View Market Performance — oanda_view","text":"","code":"if (FALSE) { # \\dontrun{ # OANDA fxTrade API key required to run this example oanda_view(\"fx\") } # }"},{"path":"https://shikokuchuo.net/ichimoku/reference/plot.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Ichimoku Cloud Chart — plot.ichimoku","title":"Plot Ichimoku Cloud Chart — plot.ichimoku","text":"Plot Ichimoku Kinko Hyo cloud charts ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/plot.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Ichimoku Cloud Chart — plot.ichimoku","text":"","code":"# S3 method for class 'ichimoku' plot( x, window, ticker, subtitle, theme = c(\"classic\", \"dark\", \"mono\", \"noguchi\", \"okabe-ito\", \"solarized\"), strat = TRUE, type = c(\"none\", \"r\", \"s\", \"bar\", \"line\"), custom, ... )"},{"path":"https://shikokuchuo.net/ichimoku/reference/plot.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Ichimoku Cloud Chart — plot.ichimoku","text":"x object class 'ichimoku'. window (optional) date-time window subset plot, ISO-8601 compatible range strings format used 'xts' objects, example \"2020-02-15/2020-08-15\" \"2020-02-15/\", \"/2020-08\" \"2020-07\". ticker (optional) specify ticker (text) include chart heading. set, ticker saved within ichimoku object used. subtitle (optional) specify subtitle display chart title. theme [default 'classic'] choices 'dark', 'mono', 'noguchi', 'okabe-ito' 'solarized'. Alternatively, supply vector 12 colour values (hex codes names) user-defined theme. strat [default TRUE] ichimoku object contains strategy, periods strategy results position shaded, strategy printed chart subtitle (otherwise specified). Set FALSE turn behaviour. type [default 'none'] type sub-plot display beneath ichimoku cloud chart, choice 'none', 'r' 's' corresponding oscillator type, 'bar' 'line' custom plots. custom (optional) character string (containing regular expression) matching column name variable displayed sub-plot. Specify type = 'bar' type = 'line', otherwise type settings take precedence. ... additional arguments passed along print method 'ggplot' objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/plot.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Ichimoku Cloud Chart — plot.ichimoku","text":"ichimoku object supplied (invisibly). requested plot output graphical device.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/plot.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot Ichimoku Cloud Chart — plot.ichimoku","text":"function S3 method generic function plot() class 'ichimoku'. can invoked calling plot(x) object 'x' class 'ichimoku'. details please refer reference vignette calling: vignette(\"reference\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/plot.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot Ichimoku Cloud Chart — plot.ichimoku","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") plot(cloud) plot(cloud, window = \"2020-05-01/2020-12-01\", theme = \"dark\") plot(cloud, window = \"2020-05/\", ticker = \"TKR Co.\", theme = \"noguchi\", type = \"s\") plot(cloud, window = \"/2020-11-02\", subtitle = \"Sample Price Data\", theme = \"mono\", type = \"r\") kumo <- ichimoku(sample_ohlc_data, ticker = \"TKR\", keep.data = TRUE) plot(kumo, window = \"2020-05/\", theme = \"solarized\", type = \"bar\", custom = \"volume\") plot(kumo, window = \"2020-05/\", theme = \"okabe-ito\", type = \"line\", custom = \"volume\")"},{"path":"https://shikokuchuo.net/ichimoku/reference/print.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Print Ichimoku Objects — print.ichimoku","title":"Print Ichimoku Objects — print.ichimoku","text":"Default print method ichimoku objects enable automatic plotting ichimoku cloud chart.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/print.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print Ichimoku Objects — print.ichimoku","text":"","code":"# S3 method for class 'ichimoku' print(x, plot = TRUE, rows = 26L, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/print.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print Ichimoku Objects — print.ichimoku","text":"x object class 'ichimoku'. plot [default TRUE] set FALSE prevent automatic plotting ichimoku cloud chart. rows [default 26L] integer number rows print. ... additional arguments passed along xts print plot.ichimoku methods.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/print.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print Ichimoku Objects — print.ichimoku","text":"ichimoku object supplied (invisibly). data printed console. ichimoku cloud chart also output graphical device depending parameters set.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/print.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Print Ichimoku Objects — print.ichimoku","text":"function S3 method generic function print() class 'ichimoku'. can invoked calling print(x) object 'x' class 'ichimoku'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/print.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print Ichimoku Objects — print.ichimoku","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") print(cloud) #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB chikou #> 2020-01-02 123.0 123.1 122.5 122.7 -1 NA NA NA NA 122.8 #> 2020-01-03 122.7 122.8 122.6 122.8 1 NA NA NA NA 122.9 #> 2020-01-06 122.8 123.4 122.4 123.3 1 NA NA NA NA 123.0 #> 2020-01-07 123.3 124.3 123.3 124.1 1 NA NA NA NA 123.9 #> 2020-01-08 124.1 124.8 124.0 124.8 1 NA NA NA NA 123.6 #> 2020-01-09 124.8 125.4 124.5 125.3 1 NA NA NA NA 122.5 #> 2020-01-10 125.3 125.3 124.8 125.2 -1 NA NA NA NA 122.6 #> 2020-01-13 125.2 125.3 125.1 125.2 0 NA NA NA NA 123.0 #> 2020-01-14 125.2 125.2 124.3 124.4 -1 123.90 NA NA NA 123.1 #> 2020-01-15 124.4 124.5 123.7 123.9 -1 123.90 NA NA NA 122.1 #> 2020-01-16 123.9 124.4 123.8 124.2 1 123.90 NA NA NA 121.9 #> 2020-01-17 124.2 124.3 123.0 123.5 -1 124.20 NA NA NA 121.1 #> 2020-01-20 123.5 123.8 123.1 123.2 -1 124.20 NA NA NA 121.4 #> 2020-01-21 123.6 123.6 123.4 123.6 0 124.20 NA NA NA 121.5 #> 2020-01-22 123.5 124.0 123.3 123.5 0 124.15 NA NA NA 121.9 #> 2020-01-23 123.5 124.5 123.3 124.3 1 124.15 NA NA NA 120.9 #> 2020-01-24 124.3 124.4 124.0 124.2 -1 124.10 NA NA NA 121.0 #> 2020-01-27 124.2 124.2 122.7 123.0 -1 123.60 NA NA NA 120.8 #> 2020-01-28 123.0 123.6 122.7 123.1 1 123.60 NA NA NA 121.2 #> 2020-01-29 123.1 123.3 123.1 123.2 1 123.60 NA NA NA 121.6 #> 2020-01-30 123.2 123.2 122.8 123.1 -1 123.60 NA NA NA 121.1 #> 2020-01-31 123.1 123.5 123.0 123.2 1 123.60 NA NA NA 122.1 #> 2020-02-03 123.2 123.3 122.6 123.0 -1 123.55 NA NA NA 122.2 #> 2020-02-04 123.0 123.1 122.6 122.9 -1 123.55 NA NA NA 122.2 #> 2020-02-05 122.9 123.2 122.6 122.8 -1 123.50 NA NA NA 122.4 #> 2020-02-06 122.8 122.9 122.8 122.8 0 123.40 123.90 NA NA 122.4 #> cloudT cloudB #> 2020-01-02 NA NA #> 2020-01-03 NA NA #> 2020-01-06 NA NA #> 2020-01-07 NA NA #> 2020-01-08 NA NA #> 2020-01-09 NA NA #> 2020-01-10 NA NA #> 2020-01-13 NA NA #> 2020-01-14 NA NA #> 2020-01-15 NA NA #> 2020-01-16 NA NA #> 2020-01-17 NA NA #> 2020-01-20 NA NA #> 2020-01-21 NA NA #> 2020-01-22 NA NA #> 2020-01-23 NA NA #> 2020-01-24 NA NA #> 2020-01-27 NA NA #> 2020-01-28 NA NA #> 2020-01-29 NA NA #> 2020-01-30 NA NA #> 2020-01-31 NA NA #> 2020-02-03 NA NA #> 2020-02-04 NA NA #> 2020-02-05 NA NA #> 2020-02-06 NA NA #> [ reached getOption(\"max.print\") -- omitted 27 rows ] print(cloud, plot = FALSE, rows = 20L) #> ichimoku [ more() to display more rows | look() to inspect attributes ] #> object #> open high low close cd tenkan kijun senkouA senkouB chikou #> 2020-01-02 123.0 123.1 122.5 122.7 -1 NA NA NA NA 122.8 #> 2020-01-03 122.7 122.8 122.6 122.8 1 NA NA NA NA 122.9 #> 2020-01-06 122.8 123.4 122.4 123.3 1 NA NA NA NA 123.0 #> 2020-01-07 123.3 124.3 123.3 124.1 1 NA NA NA NA 123.9 #> 2020-01-08 124.1 124.8 124.0 124.8 1 NA NA NA NA 123.6 #> 2020-01-09 124.8 125.4 124.5 125.3 1 NA NA NA NA 122.5 #> 2020-01-10 125.3 125.3 124.8 125.2 -1 NA NA NA NA 122.6 #> 2020-01-13 125.2 125.3 125.1 125.2 0 NA NA NA NA 123.0 #> 2020-01-14 125.2 125.2 124.3 124.4 -1 123.90 NA NA NA 123.1 #> 2020-01-15 124.4 124.5 123.7 123.9 -1 123.90 NA NA NA 122.1 #> 2020-01-16 123.9 124.4 123.8 124.2 1 123.90 NA NA NA 121.9 #> 2020-01-17 124.2 124.3 123.0 123.5 -1 124.20 NA NA NA 121.1 #> 2020-01-20 123.5 123.8 123.1 123.2 -1 124.20 NA NA NA 121.4 #> 2020-01-21 123.6 123.6 123.4 123.6 0 124.20 NA NA NA 121.5 #> 2020-01-22 123.5 124.0 123.3 123.5 0 124.15 NA NA NA 121.9 #> 2020-01-23 123.5 124.5 123.3 124.3 1 124.15 NA NA NA 120.9 #> 2020-01-24 124.3 124.4 124.0 124.2 -1 124.10 NA NA NA 121.0 #> 2020-01-27 124.2 124.2 122.7 123.0 -1 123.60 NA NA NA 120.8 #> 2020-01-28 123.0 123.6 122.7 123.1 1 123.60 NA NA NA 121.2 #> 2020-01-29 123.1 123.3 123.1 123.2 1 123.60 NA NA NA 121.6 #> cloudT cloudB #> 2020-01-02 NA NA #> 2020-01-03 NA NA #> 2020-01-06 NA NA #> 2020-01-07 NA NA #> 2020-01-08 NA NA #> 2020-01-09 NA NA #> 2020-01-10 NA NA #> 2020-01-13 NA NA #> 2020-01-14 NA NA #> 2020-01-15 NA NA #> 2020-01-16 NA NA #> 2020-01-17 NA NA #> 2020-01-20 NA NA #> 2020-01-21 NA NA #> 2020-01-22 NA NA #> 2020-01-23 NA NA #> 2020-01-24 NA NA #> 2020-01-27 NA NA #> 2020-01-28 NA NA #> 2020-01-29 NA NA #> [ reached getOption(\"max.print\") -- omitted 21 rows ]"},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":null,"dir":"Reference","previous_headings":"","what":"Relative Numeric Representation — relative","title":"Relative Numeric Representation — relative","text":"Produce statistical summary latest numeric representation ichimoku cloud chart relative historical values. determining whether current trading falls within outside normal ranges.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Relative Numeric Representation — relative","text":"","code":"relative(x, order = FALSE, signif = 0.2, quietly)"},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Relative Numeric Representation — relative","text":"x ichimoku object. order [default FALSE] set TRUE order results absolute 'z-score'. signif [default 0.2] set significance threshold 'p' equal lower, element starred '*'. quietly (optional) set TRUE, suppress printing additional output console return quietly.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Relative Numeric Representation — relative","text":"data frame containing statistical summary latest ichimoku cloud chart representation relation historical values. addition, time index latest observed values total number datapoints printed console.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Relative Numeric Representation — relative","text":"'mean(X)' mean value element X, 'sd(X)' standard deviation, 'X[n]' nth latest observed values. 'res' residual X[n] - mean(X) represents centred measure deviation latest observed value. 'z-score' (standard score) calculated res / sd(X) centred scaled measure deviation latest observed value. 'p >= |z|' represents empirical probability latest observed absolute 'z-score' greater. 'p*' display star 'p >= |z|' less equal value argument 'signif'. 'E(|res|)|p' represents mean expected absolute value 'res', conditional upon absolute 'z-score' greater equal latest observed absolute 'z-score'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"Relative Numeric Representation — relative","text":"Please refer strategies vignette calling: vignette(\"strategies\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/relative.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Relative Numeric Representation — relative","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") statistics <- relative(cloud, quietly = TRUE) relative(cloud, signif = 0.4) #> Latest: 2020-12-24 00:00:00 | n: 155 #> mean(X) sd(X) X[n] res z-score p >= |z| p* E(|res|)|p #> chikou_close 1.51 6.07 7.00 5.49 0.91 0.39 * 8.53 #> chikou_high 0.79 6.09 6.60 5.81 0.95 0.36 * 8.91 #> chikou_low 2.31 6.12 7.80 5.49 0.90 0.41 8.40 #> chikou_tenkan 1.73 6.15 6.90 5.17 0.84 0.41 8.70 #> chikou_kijun 2.28 5.96 4.90 2.62 0.44 0.63 6.84 #> chikou_senkouA 3.44 6.46 4.75 1.31 0.20 0.89 6.26 #> chikou_senkouB 4.26 5.40 4.35 0.09 0.02 1.00 4.76 #> chikou_cloudT 2.67 6.44 4.35 1.68 0.26 0.84 6.59 #> chikou_cloudB 5.03 5.20 4.75 -0.28 -0.05 0.99 4.60 #> close_tenkan 0.52 1.77 1.70 1.18 0.67 0.52 2.19 #> close_kijun 1.27 3.25 3.85 2.58 0.79 0.48 4.26 #> close_senkouA 2.00 5.93 5.90 3.90 0.66 0.49 7.71 #> close_senkouB 3.02 5.34 5.75 2.73 0.51 0.73 5.79 #> close_cloudT 1.27 5.73 5.75 4.48 0.78 0.43 7.94 #> close_cloudB 3.75 5.31 5.90 2.15 0.40 0.70 5.90 #> high_tenkan 1.21 1.56 1.90 0.69 0.44 0.66 1.65 #> high_kijun 1.96 3.12 4.05 2.09 0.67 0.53 3.91 #> high_senkouA 2.69 5.84 6.10 3.41 0.58 0.56 7.16 #> high_senkouB 3.71 5.29 5.95 2.24 0.42 0.76 5.61 #> high_cloudT 1.96 5.64 5.95 3.99 0.71 0.48 7.46 #> high_cloudB 4.44 5.27 6.10 1.66 0.32 0.71 5.80 #> low_tenkan -0.30 1.72 1.30 1.60 0.93 0.40 * 2.37 #> low_kijun 0.44 3.28 3.45 3.01 0.92 0.43 4.50 #> low_senkouA 1.18 5.97 5.50 4.32 0.72 0.45 8.12 #> low_senkouB 2.19 5.38 5.35 3.16 0.59 0.64 6.25 #> low_cloudT 0.45 5.76 5.35 4.90 0.85 0.43 8.02 #> low_cloudB 2.92 5.38 5.50 2.58 0.48 0.68 6.04 #> tenkan_kijun 0.75 2.42 2.15 1.40 0.58 0.60 2.79 #> tenkan_senkouA 1.48 5.44 4.20 2.72 0.50 0.57 6.61 #> tenkan_senkouB 2.49 5.12 4.05 1.56 0.30 0.79 5.26 #> tenkan_cloudT 0.75 5.20 4.05 3.30 0.63 0.50 6.82 #> tenkan_cloudB 3.23 5.12 4.20 0.97 0.19 0.79 5.17 #> kijun_senkouA 0.74 3.64 2.05 1.31 0.36 0.69 4.05 #> kijun_senkouB 1.75 4.16 1.90 0.15 0.04 0.97 3.50 #> kijun_cloudT 0.00 3.62 1.90 1.90 0.52 0.64 4.18 #> kijun_cloudB 2.48 3.86 2.05 -0.43 -0.11 0.98 3.31 #> senkouA_senkouB 1.01 2.98 -0.15 -1.16 -0.39 0.70 3.27 relative(cloud, order = TRUE, signif = 0.4) #> Latest: 2020-12-24 00:00:00 | n: 155 #> mean(X) sd(X) X[n] res z-score p >= |z| p* E(|res|)|p #> chikou_high 0.79 6.09 6.60 5.81 0.95 0.36 * 8.91 #> low_tenkan -0.30 1.72 1.30 1.60 0.93 0.40 * 2.37 #> low_kijun 0.44 3.28 3.45 3.01 0.92 0.43 4.50 #> chikou_close 1.51 6.07 7.00 5.49 0.91 0.39 * 8.53 #> chikou_low 2.31 6.12 7.80 5.49 0.90 0.41 8.40 #> low_cloudT 0.45 5.76 5.35 4.90 0.85 0.43 8.02 #> chikou_tenkan 1.73 6.15 6.90 5.17 0.84 0.41 8.70 #> close_kijun 1.27 3.25 3.85 2.58 0.79 0.48 4.26 #> close_cloudT 1.27 5.73 5.75 4.48 0.78 0.43 7.94 #> low_senkouA 1.18 5.97 5.50 4.32 0.72 0.45 8.12 #> high_cloudT 1.96 5.64 5.95 3.99 0.71 0.48 7.46 #> high_kijun 1.96 3.12 4.05 2.09 0.67 0.53 3.91 #> close_tenkan 0.52 1.77 1.70 1.18 0.67 0.52 2.19 #> close_senkouA 2.00 5.93 5.90 3.90 0.66 0.49 7.71 #> tenkan_cloudT 0.75 5.20 4.05 3.30 0.63 0.50 6.82 #> low_senkouB 2.19 5.38 5.35 3.16 0.59 0.64 6.25 #> high_senkouA 2.69 5.84 6.10 3.41 0.58 0.56 7.16 #> tenkan_kijun 0.75 2.42 2.15 1.40 0.58 0.60 2.79 #> kijun_cloudT 0.00 3.62 1.90 1.90 0.52 0.64 4.18 #> close_senkouB 3.02 5.34 5.75 2.73 0.51 0.73 5.79 #> tenkan_senkouA 1.48 5.44 4.20 2.72 0.50 0.57 6.61 #> low_cloudB 2.92 5.38 5.50 2.58 0.48 0.68 6.04 #> high_tenkan 1.21 1.56 1.90 0.69 0.44 0.66 1.65 #> chikou_kijun 2.28 5.96 4.90 2.62 0.44 0.63 6.84 #> high_senkouB 3.71 5.29 5.95 2.24 0.42 0.76 5.61 #> close_cloudB 3.75 5.31 5.90 2.15 0.40 0.70 5.90 #> senkouA_senkouB 1.01 2.98 -0.15 -1.16 -0.39 0.70 3.27 #> kijun_senkouA 0.74 3.64 2.05 1.31 0.36 0.69 4.05 #> high_cloudB 4.44 5.27 6.10 1.66 0.32 0.71 5.80 #> tenkan_senkouB 2.49 5.12 4.05 1.56 0.30 0.79 5.26 #> chikou_cloudT 2.67 6.44 4.35 1.68 0.26 0.84 6.59 #> chikou_senkouA 3.44 6.46 4.75 1.31 0.20 0.89 6.26 #> tenkan_cloudB 3.23 5.12 4.20 0.97 0.19 0.79 5.17 #> kijun_cloudB 2.48 3.86 2.05 -0.43 -0.11 0.98 3.31 #> chikou_cloudB 5.03 5.20 4.75 -0.28 -0.05 0.99 4.60 #> kijun_senkouB 1.75 4.16 1.90 0.15 0.04 0.97 3.50 #> chikou_senkouB 4.26 5.40 4.35 0.09 0.02 1.00 4.76"},{"path":"https://shikokuchuo.net/ichimoku/reference/sample_ohlc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample OHLC Price Data — sample_ohlc_data","title":"Sample OHLC Price Data — sample_ohlc_data","text":"Simulated prices hypothetical financial asset. Created purpose demonstrating package functions examples vignettes .","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/sample_ohlc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample OHLC Price Data — sample_ohlc_data","text":"","code":"sample_ohlc_data"},{"path":"https://shikokuchuo.net/ichimoku/reference/sample_ohlc_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Sample OHLC Price Data — sample_ohlc_data","text":"data frame 256 observations 6 variables: time - timestamp observation [POSIXct] open - opening price [numeric] low - low price [numeric] high - high price [numeric] close - closing price [numeric] volume - volume [integer]","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/sample_ohlc_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Sample OHLC Price Data — sample_ohlc_data","text":"applicable: simulated data","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/sample_ohlc_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sample OHLC Price Data — sample_ohlc_data","text":"","code":"head(sample_ohlc_data) #> time open high low close volume #> 1 2020-01-02 123.0 123.1 122.5 122.7 1875 #> 2 2020-01-03 122.7 122.8 122.6 122.8 1479 #> 3 2020-01-06 122.8 123.4 122.4 123.3 1792 #> 4 2020-01-07 123.3 124.3 123.3 124.1 1977 #> 5 2020-01-08 124.1 124.8 124.0 124.8 2239 #> 6 2020-01-09 124.8 125.4 124.5 125.3 1842"},{"path":"https://shikokuchuo.net/ichimoku/reference/str.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Display the Structure of Ichimoku Objects — str.ichimoku","title":"Display the Structure of Ichimoku Objects — str.ichimoku","text":"Compactly display internal structure ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/str.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display the Structure of Ichimoku Objects — str.ichimoku","text":"","code":"# S3 method for class 'ichimoku' str(object, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/str.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Display the Structure of Ichimoku Objects — str.ichimoku","text":"object object class 'ichimoku'. ... arguments passed methods.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/str.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Display the Structure of Ichimoku Objects — str.ichimoku","text":"Invisible NULL. compact display structure object output console.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/str.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Display the Structure of Ichimoku Objects — str.ichimoku","text":"function S3 method generic function str() class 'ichimoku'. can invoked calling str(x) object 'x' class 'ichimoku'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/str.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display the Structure of Ichimoku Objects — str.ichimoku","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") str(cloud) #> ichimoku object [2020-01-02 / 2021-02-01] (281, 12) #> $open $high $low $close $cd $tenkan $kijun $senkouA $senkouB $chikou $cloudT $cloudB #> index: 2020-01-02 ... 2021-02-01 #> attributes: #> periods: 9 26 52 #> periodicity: 1 days #> ticker: TKR strat <- strat(cloud) str(strat) #> ichimoku object [2020-01-02 / 2021-02-01] (281, 19) w/ strat #> $open $high $low $close $cd $tenkan $kijun $senkouA $senkouB $chikou $cloudT $cloudB $cond $posn $txn $logret $slogret $ret $sret #> index: 2020-01-02 ... 2021-02-01 #> attributes: #> periods: 9 26 52 #> periodicity: 1 days #> ticker: TKR #> strat: [strategy: close > tenkan w/ direction: long... ]"},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Ichimoku Strategies — strat","title":"Create Ichimoku Strategies — strat","text":"Create ichimoku cloud strategies using indicator condition 'long / short c1 > c2'. Complex strategies can formulated combined 'c1 > c2 & c3 > c4' (conditions must satisfied) asymmetric 'c1 > c2 x c3 > c4' ('c1 > c2' denotes entry 'c3 > c4' exit indicator).","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Ichimoku Strategies — strat","text":"","code":"strat( x, c1 = c(\"close\", \"chikou\", \"open\", \"high\", \"low\", \"tenkan\", \"kijun\", \"senkouA\", \"senkouB\", \"cloudT\", \"cloudB\"), c2 = c(\"tenkan\", \"kijun\", \"senkouA\", \"senkouB\", \"cloudT\", \"cloudB\", \"chikou\", \"close\", \"open\", \"high\", \"low\"), c3 = c(\"close\", \"chikou\", \"open\", \"high\", \"low\", \"tenkan\", \"kijun\", \"senkouA\", \"senkouB\", \"cloudT\", \"cloudB\"), c4 = c(\"tenkan\", \"kijun\", \"senkouA\", \"senkouB\", \"cloudT\", \"cloudB\", \"chikou\", \"close\", \"open\", \"high\", \"low\"), dir = c(\"long\", \"short\"), type = 2 )"},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Ichimoku Strategies — strat","text":"x ichimoku object. c1 [default 'close'] column name specified string. c2 [default 'tenkan'] column name specified string. c3 (optional) column name specified string. c4 (optional) column name specified string. dir [default 'long'] trade direction, either 'long' 'short'. type [default 2] 'c3' 'c4' specified, type 2 create combined strategy 'c1 > c2 & c3 > c4' whilst type 3 create asymmetric strategy 'c1 > c2 x c3 > c4'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Ichimoku Strategies — strat","text":"ichimoku object augmented strategy.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create Ichimoku Strategies — strat","text":"following assumption applies strategies: confirmation whether condition satisfied received 'close' particular period, transaction initiated immediately following 'open'. transactions occur 'open'. default, periods strategy results position shaded ichimoku cloud chart strategy printed chart message (otherwise specified). turn behaviour, pass strat = FALSE argument plot() iplot().","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"ichimoku-object-specification-for-strategies","dir":"Reference","previous_headings":"","what":"Ichimoku Object Specification for Strategies","title":"Create Ichimoku Strategies — strat","text":"ichimoku object augmented following additional elements: Columns [numeric]: $cond: boolean vector indicator condition met $posn: boolean vector indicating position held $txn: vector representing transactions implement position (1 = enter position, -1 = exit position) $logret: vector log returns $slogret: vector log returns strategy $ret: vector discrete returns $sret: vector discrete returns strategy Attributes: $strat: strategy summary [matrix] strategy summary may accessed summary() method ichimoku objects via look.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"complex-strategies","dir":"Reference","previous_headings":"","what":"Complex Strategies","title":"Create Ichimoku Strategies — strat","text":"complex strategies: 's1' denotes strategy 'c1 > c2' 's2' denotes strategy 'c3 > c4'. Combined strategy 's1 & s2': indicator conditions 's1' 's2' met simulateneously position taken. column $cond show conditions met Asymmetric strategy 's1 x s2': indicator condition 's1' met enter position, indicator condition 's2' exit position. rules applied recursively length data. column $cond show indicator condition met 's1'","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"Create Ichimoku Strategies — strat","text":"Please refer strategies vignette calling: vignette(\"strategies\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/strat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Ichimoku Strategies — strat","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") strat <- strat(cloud, c1 = \"tenkan\", c2 = \"cloudB\", dir = \"short\") summary(strat) #> [,1] #> Strategy \"tenkan > cloudB\" #> --------------------- \"----------\" #> Strategy cuml return % 10 #> Per period mean ret % 0.0536 #> Periods in market 127 #> Total trades 4 #> Average trade length 31.75 #> Trade success % 75 #> Worst trade ret % -1.42 #> --------------------- \"----------\" #> Benchmark cuml ret % -5.24 #> Per period mean ret % -0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"short\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" plot(strat) strat2 <- strat(cloud, c1 = \"cloudT\", c2 = \"kijun\", c3 = \"cloudT\", c4 = \"close\") summary(strat2) #> [,1] #> Strategy \"cloudT > kijun & cloudT > close\" #> --------------------- \"----------\" #> Strategy cuml return % 9.82 #> Per period mean ret % 0.0527 #> Periods in market 63 #> Total trades 5 #> Average trade length 12.6 #> Trade success % 80 #> Worst trade ret % -0.97 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" plot(strat2)"},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine Ichimoku Strategies — stratcombine","title":"Combine Ichimoku Strategies — stratcombine","text":"Create custom strategies combining existing strategies contained ichimoku objects 's1' 's2' form 's1 & s2'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine Ichimoku Strategies — stratcombine","text":"","code":"stratcombine(s1, s2)"},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine Ichimoku Strategies — stratcombine","text":"s1 ichimoku object containing strategy. s2 ichimoku object containing strategy.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine Ichimoku Strategies — stratcombine","text":"ichimoku object augmented combined strategy.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Combine Ichimoku Strategies — stratcombine","text":"combined strategy 's1 & s2' means indicator conditions 's1' 's2' met simulateneously trade position taken. boolean values showing whether conditions met stored 'cond' column. strategy summary may accessed summary() method ichimoku objects via look.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":"further-details","dir":"Reference","previous_headings":"","what":"Further Details","title":"Combine Ichimoku Strategies — stratcombine","text":"Please refer strategies vignette calling: vignette(\"strategies\", package = \"ichimoku\")","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/stratcombine.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combine Ichimoku Strategies — stratcombine","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") strat1 <- strat(cloud, c1 = \"close\", c2 = \"kijun\") strat2 <- strat(cloud, c1 = \"cloudB\", c2 = \"tenkan\") cstrat <- stratcombine(strat1, strat2) summary(cstrat) #> [,1] #> Strategy \"close > kijun & cloudB > tenkan\" #> --------------------- \"----------\" #> Strategy cuml return % 7.32 #> Per period mean ret % 0.0397 #> Periods in market 18 #> Total trades 3 #> Average trade length 6 #> Trade success % 100 #> Worst trade ret % 0.53 #> --------------------- \"----------\" #> Benchmark cuml ret % 5.53 #> Per period mean ret % 0.0302 #> Periods in market 178 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-04-19 23:00:00 #> End 2020-12-23 #> Ticker \"TKR\" plot(cstrat)"},{"path":"https://shikokuchuo.net/ichimoku/reference/summary.ichimoku.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","title":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","text":"Display summary information ichimoku object strategy.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/summary.ichimoku.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","text":"","code":"# S3 method for class 'ichimoku' summary(object, strat = TRUE, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/summary.ichimoku.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","text":"object object class 'ichimoku'. strat [default TRUE] show strategy summary present. Set FALSE show object summary instead. ... arguments passed methods.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/summary.ichimoku.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","text":"matrix containing strategy summary, present 'strat' set TRUE, otherwise character vector containing abbreviated object summary (full object summary output console).","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/summary.ichimoku.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","text":"function S3 method generic function summary() class 'ichimoku'. can invoked calling summary(x) object 'x' class 'ichimoku'. Performs basic validation ichimoku object inform ichimoku object contains invalid information.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/summary.ichimoku.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary of Ichimoku Objects and Strategies — summary.ichimoku","text":"","code":"cloud <- ichimoku(sample_ohlc_data, ticker = \"TKR\") summary(cloud) #> ichimoku object with dimensions (281, 12) #> #> Max: 2020-07-13 23:00:00 [139.7] #> Start: 2020-01-02 00:00:00 [123] End: 2020-12-24 00:00:00 [136] #> Min: 2020-05-12 23:00:00 [119.1] #> #> Cloud periods: 9 26 52 #> Periodicity: 1 days #> Ticker: TKR strat <- strat(cloud) summary(strat) #> [,1] #> Strategy \"close > tenkan\" #> --------------------- \"----------\" #> Strategy cuml return % 8.57 #> Per period mean ret % 0.0334 #> Periods in market 138 #> Total trades 20 #> Average trade length 6.9 #> Trade success % 35 #> Worst trade ret % -2.54 #> --------------------- \"----------\" #> Benchmark cuml ret % 9 #> Per period mean ret % 0.035 #> Periods in market 246 #> --------------------- \"----------\" #> Direction \"long\" #> Start 2020-01-15 #> End 2020-12-23 #> Ticker \"TKR\""},{"path":"https://shikokuchuo.net/ichimoku/reference/tradingDays.html","id":null,"dir":"Reference","previous_headings":"","what":"Select Trading Days — tradingDays","title":"Select Trading Days — tradingDays","text":"Used ichimoku subset vector dates trading days.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/tradingDays.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select Trading Days — tradingDays","text":"","code":"tradingDays(x, holidays, ...)"},{"path":"https://shikokuchuo.net/ichimoku/reference/tradingDays.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select Trading Days — tradingDays","text":"x vector POSIXct date objects. holidays (optional) vector, function outputs vector, dates defined holidays. Set NULL continuously-traded market. ... arguments used function.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/tradingDays.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select Trading Days — tradingDays","text":"vector logical values: TRUE corresponding element 'x' weekday holiday, FALSE otherwise. , parameter 'holidays' set NULL, vector TRUE values length 'x'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/tradingDays.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Select Trading Days — tradingDays","text":"New Year's Day (01-01) Christmas Day (12-25) defined holidays default 'holidays' specified.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/tradingDays.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Select Trading Days — tradingDays","text":"","code":"dates <- seq(from = as.POSIXct(\"2020-01-01\"), by = \"1 day\", length.out = 7) dates #> [1] \"2020-01-01 UTC\" \"2020-01-02 UTC\" \"2020-01-03 UTC\" \"2020-01-04 UTC\" #> [5] \"2020-01-05 UTC\" \"2020-01-06 UTC\" \"2020-01-07 UTC\" tradingDays(dates) #> [1] FALSE TRUE TRUE FALSE FALSE TRUE TRUE tradingDays(dates, holidays = c(\"2020-01-02\", \"2020-01-03\")) #> [1] TRUE FALSE FALSE FALSE FALSE TRUE TRUE tradingDays(dates, holidays = NULL) #> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE"},{"path":"https://shikokuchuo.net/ichimoku/reference/xts_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert xts to data.frame — xts_df","title":"Convert xts to data.frame — xts_df","text":"optimised 'xts' 'data.frame' constructor.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/xts_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert xts to data.frame — xts_df","text":"","code":"xts_df(x, keep.attrs = FALSE)"},{"path":"https://shikokuchuo.net/ichimoku/reference/xts_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert xts to data.frame — xts_df","text":"x 'xts' object. keep.attrs [default FALSE] set TRUE, preserve custom attributes set original object.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/xts_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert xts to data.frame — xts_df","text":"'data.frame' object. 'xts' index preserved first column header 'index'.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/xts_df.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Convert xts to data.frame — xts_df","text":"optimised data.frame constructors used internally within package made available utilities. Please note data validation checking performed.","code":""},{"path":"https://shikokuchuo.net/ichimoku/reference/xts_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert xts to data.frame — xts_df","text":"","code":"cloud <- ichimoku(sample_ohlc_data) df <- xts_df(cloud) str(df) #> 'data.frame':\t281 obs. of 13 variables: #> $ index : POSIXct, format: \"2020-01-02 00:00:00\" \"2020-01-03 00:00:00\" ... #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... df2 <- xts_df(cloud, keep.attrs = TRUE) str(df2) #> 'data.frame':\t281 obs. of 13 variables: #> $ index : POSIXct, format: \"2020-01-02 00:00:00\" \"2020-01-03 00:00:00\" ... #> $ open : num 123 123 123 123 124 ... #> $ high : num 123 123 123 124 125 ... #> $ low : num 122 123 122 123 124 ... #> $ close : num 123 123 123 124 125 ... #> $ cd : num -1 1 1 1 1 1 -1 0 -1 -1 ... #> $ tenkan : num NA NA NA NA NA ... #> $ kijun : num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouA: num NA NA NA NA NA NA NA NA NA NA ... #> $ senkouB: num NA NA NA NA NA NA NA NA NA NA ... #> $ chikou : num 123 123 123 124 124 ... #> $ cloudT : num NA NA NA NA NA NA NA NA NA NA ... #> $ cloudB : num NA NA NA NA NA NA NA NA NA NA ... #> - attr(*, \"periods\")= int [1:3] 9 26 52 #> - attr(*, \"periodicity\")= num 86400 #> - attr(*, \"ticker\")= chr \"sample_ohlc_data\""},{"path":[]},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-5-4-9000","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.5.4.9000 (development)","text":"Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-154","dir":"Changelog","previous_headings":"","what":"ichimoku 1.5.4","title":"ichimoku 1.5.4","text":"CRAN release: 2024-08-18","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-5-4","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.5.4","text":"Fixes cases asymmetric (type 3) strategies generating final entry signal corresponding exit condition yet met (thanks @bbac63 #9). Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-153","dir":"Changelog","previous_headings":"","what":"ichimoku 1.5.3","title":"ichimoku 1.5.3","text":"CRAN release: 2024-06-23","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-5-3","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.5.3","text":"Internal performance enhancements. Requires secretbase >= 1.0.0.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-152","dir":"Changelog","previous_headings":"","what":"ichimoku 1.5.2","title":"ichimoku 1.5.2","text":"CRAN release: 2024-06-04","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-5-2","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.5.2","text":"archive() reverts using SHA256. Requires nanonext >= 1.0.0 mirai >= 1.0.0.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-151","dir":"Changelog","previous_headings":"","what":"ichimoku 1.5.1","title":"ichimoku 1.5.1","text":"CRAN release: 2024-04-10","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-5-1","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.5.1","text":"Fixes oanda_studio() live chart longer greys updating (recent Shiny versions).","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-150","dir":"Changelog","previous_headings":"","what":"ichimoku 1.5.0","title":"ichimoku 1.5.0","text":"CRAN release: 2024-02-05","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-5-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.5.0","text":"Note: archive files created using earlier package versions can longer verified using archive() may nevertheless loaded using readRDS().","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-5-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.5.0","text":"Requires secretbase.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-1413","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.13","title":"ichimoku 1.4.13","text":"CRAN release: 2024-01-15","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-13","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.13","text":"oanda_quote() now correctly writes new line quote. Internal performance enhancements. Requires nanonext >= 0.12.0 mirai >= 0.12.0.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-1412","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.12","title":"ichimoku 1.4.12","text":"CRAN release: 2023-12-15","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-12","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.12","text":"Uses ‘mirai’ run oanda_studio(new.process = TRUE) Fixes oanda_switch() regression 1.4.11. Updates internal OANDA instruments list. Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-1411","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.11","title":"ichimoku 1.4.11","text":"CRAN release: 2023-12-08","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-4-11","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.4.11","text":"Allows using environment variable ‘OANDA_API_KEY’ alternative ‘keyring’ package.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-11","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.11","text":"Arguments ‘keep.data’ ‘keep.attrs’ across package now explicit default value FALSE (resultant change behaviour). Internal performance enhancements. Requires nanonext >= 0.11.0.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-1410","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.10","title":"ichimoku 1.4.10","text":"CRAN release: 2023-10-28","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-10","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.10","text":"Improves handling OANDA API errors.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-149","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.9","title":"ichimoku 1.4.9","text":"CRAN release: 2023-09-03","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-9","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.9","text":"Internal performance enhancements. Requires nanonext >= 0.10.0 R >= 3.5.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-148","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.8","title":"ichimoku 1.4.8","text":"CRAN release: 2023-08-24","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-8","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.8","text":"Ensures compatibility upcoming {nanonext} releases. Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-147","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.7","title":"ichimoku 1.4.7","text":"CRAN release: 2023-08-07","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-7","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.7","text":"Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-146","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.6","title":"ichimoku 1.4.6","text":"CRAN release: 2023-04-29","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-6","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.6","text":"Switches C interface provided ‘RcppSimdJson’ JSON parsing. Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-145","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.5","title":"ichimoku 1.4.5","text":"CRAN release: 2023-02-15","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-5","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.5","text":"mlgrid() argument ‘func’ becomes ‘expr’ takes named list quoted language objects expressions rather functions versatility custom calculations (advanced use). Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-144","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.4","title":"ichimoku 1.4.4","text":"CRAN release: 2023-01-09","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-4","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.4","text":"oanda_instruments() retries encountering non-success server status code (eliminating potential error calling OANDA function first time session). Updates internal OANDA instruments list. Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-143","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.3","title":"ichimoku 1.4.3","text":"CRAN release: 2022-12-08","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-4-3","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.4.3","text":"mlgrid() gains argument ‘func’ supplying named list functions custom calculations (advanced use). Also, choosing type z-score, now returns ‘means’ ‘sdevs’ used standardise grid attributes.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-3","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.3","text":"Improved performance reliability oanda_stream(). Returned dataframe longer contains column ‘type’, always ‘PRICE’. Fixes ichimoku() validation code POSIXct handling changes upcoming R 4.3.0. longer attempts plot single row (subset) ichimoku object. API changes ‘ggplot2’ require version >= 3.4.0; R version requirement consequently raised 3.3. Improved stability OANDA functions requiring nanonext >= 0.7.0. Switch ‘jsonlite’ ‘RcppSimdJson’ JSON parsing. Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-142","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.2","title":"ichimoku 1.4.2","text":"CRAN release: 2022-10-16","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-2","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.2","text":"Implements fix upcoming R 4.3.0 (thanks @kalibera). Internal changes requiring nanonext >= 0.6.0.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-141","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.1","title":"ichimoku 1.4.1","text":"CRAN release: 2022-09-25","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-1","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.1","text":"Internal performance enhancements.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-140","dir":"Changelog","previous_headings":"","what":"ichimoku 1.4.0","title":"ichimoku 1.4.0","text":"CRAN release: 2022-09-08","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-4-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.4.0","text":"New print method ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-4-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.4.0","text":"conjunction new print method, () now defaults printing rows default unless ‘rows’ specified. SHA-256 authentication archive() faster upgrade use ‘MbedTLS’ library via ‘nanonext’. archive() now returns filename saving archive rather NULL. as_tibble method ichimoku objects removed. OANDA functions now use ‘nanonext’ retrieve data instead ‘curl’. ‘curl’, ‘tibble’ ‘openssl’ dependencies retired.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-134","dir":"Changelog","previous_headings":"","what":"ichimoku 1.3.4","title":"ichimoku 1.3.4","text":"CRAN release: 2022-08-23","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-3-4","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.3.4","text":"Moves ‘shiny’ ‘imports’ ‘suggests’. Updates internal OANDA instruments list.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-133","dir":"Changelog","previous_headings":"","what":"ichimoku 1.3.3","title":"ichimoku 1.3.3","text":"CRAN release: 2022-07-04","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-3-3","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.3.3","text":"Fixed regression 1.3.2 caused iplot() fail.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-132","dir":"Changelog","previous_headings":"","what":"ichimoku 1.3.2","title":"ichimoku 1.3.2","text":"CRAN release: 2022-06-23","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-3-2","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.3.2","text":"default ‘original’ theme renamed ‘classic’ ‘fresh’ replaced ‘okabe-ito’ theme (using colours colourblind-friendly palette) ‘conceptual’ theme renamed ‘noguchi’ (palette inspired works Isamu Noguchi)","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-131","dir":"Changelog","previous_headings":"","what":"ichimoku 1.3.1","title":"ichimoku 1.3.1","text":"CRAN release: 2022-05-23","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-3-1","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.3.1","text":"theme argument plot() oanda_chart() now accepts user-defined vector 12 colour values (hex values R colour names).","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-3-1","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.3.1","text":"Minor UI tweaks internal performance optimisations.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-130","dir":"Changelog","previous_headings":"","what":"ichimoku 1.3.0","title":"ichimoku 1.3.0","text":"CRAN release: 2022-02-21","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-3-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.3.0","text":"Sub-plots now feature chart values can read via infotip iplot() oanda_studio(). R/S-type indicators now option oanda_chart() oanda_studio(). .ichimoku() introduced faster technical utility version ichimoku() use data already prescribed format.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-3-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.3.0","text":"Dependency C++ compiler, ‘cpp11’ ‘gtable’ packages retired. Internal rolling min/max/mean functions re-implemented directly C; various ichimoku functions now call C code internally. Added LinkingTo: xts use C function exported ‘xts’. df_trim() extraplot() removed longer required. ‘limit’ argument oanda_chart() oanda_stream() changed accept time seconds rather minutes. new.process = TRUE oanda_studio() now portable works Windows. Fixes oanda_stream() multiple bid/ask liquidity levels returned stream. Returned dataframe now revised tidier format correct data types ease processing. Fixes archive() work correctly R-oldrel (4.0). performance enhancements ichimoku(), mlgrid() plot functions. Documentation refresh.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-125","dir":"Changelog","previous_headings":"","what":"ichimoku 1.2.5","title":"ichimoku 1.2.5","text":"CRAN release: 2021-12-13","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-2-5","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.2.5","text":"Enhancement printing ichimoku objects utilising ‘tibble’ print method (adds dependency ‘tibble’ package), paired () quick printing rows. Optimised as_tibble() method implemented ichimoku objects. k specify k-period time horizon calculate target variable ‘y’. type = 'z-score' produce standard score ‘numeric’ type grid. format choose returning dataframe matrix. New oanda_orders() function provides OANDA fxTrade order book certain major currency pairs. Major revamp oanda_stream() much improved interface now renders stream structured dataframe. oanda_chart() oanda_stream() gain argument ‘limit’ imposes time limit session data returned automatically. oanda_positions() gains parameter ‘time’ retrieving position book particular time. archive() gains ability save files interactively using system dialog - call function object, leaving second argument empty e.g. archive(object, ). index() gains parameter ‘subset’ fast subsetting ichimoku cloud indexes. New plot themes ‘conceptual’ ‘fresh’.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-2-5","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.2.5","text":"Simplification look() removing ‘’ argument. extract ichimoku objects autostrat lists, subset list directly. object argument now optional, accessing .Last.value otherwise. Minor enhancements str() method. df_append() argument order ‘old’ ‘new’ swapped allow chaining pipe operator. archive() now safe use non-interactive settings, longer prompts confirm overwriting existing files. oanda_view() updated new instruments now returns correct data types dataframe. Fixes cases relative() showing incorrect date ‘latest’, along cosmetic changes. General performance improvements date handling dataframe conversions. Documentation refresh.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-124","dir":"Changelog","previous_headings":"","what":"ichimoku 1.2.4","title":"ichimoku 1.2.4","text":"CRAN release: 2021-10-18","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-2-4","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.2.4","text":"New relative() function produces statistical summary latest ichimoku cloud chart numeric representation relative historical values, determining whether trading falls within outside normal ranges. oanda_studio() gains argument ‘new.process’, set TRUE, starts shiny session new R process, unblocking current process allowing continued use console. mlgrid() gains argument y = 'none' grid latest cloud representation without ‘y’. autostrat(), relative() oanda() gain argument ‘quietly’ suppresses additional console output set TRUE. Improved time index handling ichimoku(): conversion .POSIXct() fails, convert numeric values POSIX times (appropriate warning). Optimised ‘ichimoku’ methods coredata() index() generic functions. ‘ichimoku’ method .data.frame() implemented marginally faster version xts_df() ichimoku objects. informative custom str() summary() methods implemented ichimoku objects.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-2-4","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.2.4","text":"OANDA functions, ‘server’ parameter specified, corresponding API key now retrieved rather default, allowing example oanda_studio(server = \"live\", new.process = TRUE) Improved appearance progress indicators oanda() oanda_view(). oanda() now safe use non-interactively - longer prompt cases. Improvements visual appearance oscillator plots. Update interactive interface oanda_set_key(). Fixes sign %chg oanda_quote(). xts() longer re-exported ‘xts’ package ichimoku() can now fully re-construct ichimoku object components (see ‘Working ichimoku objects’ Reference vignette). performance improvements ichimoku() functions. Documentation refresh.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-122","dir":"Changelog","previous_headings":"","what":"ichimoku 1.2.2","title":"ichimoku 1.2.2","text":"CRAN release: 2021-10-05","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-2-2","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.2.2","text":"New oanda_quote() function outputs latest quote instrument along intraday trading statistics console. New oanda_view() function provides latest overview entire market - showing relative performance constituents. New oanda_positions() function provides OANDA fxTrade position book (% longs shorts price level) certain major currency pairs. archive() now allows files chosen interactively using system dialog - call function arguments. df_append() utility now faster gains arguments ‘key’ ‘keep.attr’.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-2-2","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.2.2","text":"Accessibility improvements: default ‘original’ theme adjusted accommodate colour vision deficiency. OANDA functions now prompt missing required arguments instead returning errors. ease use, ‘instrument’ argument OANDA functions now case-insensitive delimiter may supplied either ’_’ ‘-’, oanda(\"usd-jpy\") oanda(\"USD_JPY\") acceptable. tradingDays() argument ‘noholidays’ removed favour ‘holidays = NULL’. Logic changed slightly default holidays applied ‘holidays’ specified. Minor performance improvements OANDA ML layer functions. Documentation refresh","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-121","dir":"Changelog","previous_headings":"","what":"ichimoku 1.2.1","title":"ichimoku 1.2.1","text":"CRAN release: 2021-09-23","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-2-1","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.2.1","text":"Fix issue ‘bslib’ theming release Shiny 1.7.0. improved reliability, ‘bslib’ optional dependency removed. neutral formatting oanda_stream() output accommodate different console colour schemes. Fix cases mis-alignment main sub-plots, axis label formatting custom plots. Fix issue caused iplot() re-calculate indicators adjusting data window. Package dependency switched ‘gridExtra’ ‘gtable’. Minor performance improvements ichimoku() functions.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-120","dir":"Changelog","previous_headings":"","what":"ichimoku 1.2.0","title":"ichimoku 1.2.0","text":"CRAN release: 2021-09-20","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-2-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.2.0","text":"ichimoku() adds ability create pseudo cloud charts single series price data OHLC data available. ichimoku() gains ‘keep.data’ argument retaining additional data present input object. Plot functions gain ‘type’ argument enable choice oscillator (R-type S-type) shown sub-plot. Plot functions gain ‘custom’ argument enable custom data variable plot line bar chart sub-plot area. oanda_studio() adds button saving underlying data live ichimoku cloud chart using archive(). oanda_chart() now returns underlying ichimoku object (invisibly) function exit, providing easy access chart data. oanda_set_key() adds support storing practice live account API keys. New oanda_switch() function allows default server switched ‘practice’ ‘live’ session.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-2-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.2.0","text":"Adds fallback oanda_instruments() using internal instruments table API call fails. plot.ichimoku() now returns original object invisibly, use autoplot() extraplot() return plot objects. plot functions, argument ‘message’ renamed ‘subtitle’. Plots now show Tenkan-sen Kijun-sen. Slight adjustments original theme: cloud edges now plum-tinted Senkou , cyan-tinted Senkou B. Fixes certain cases calculation future cloud fail data frequency lower daily. Updates sample_ohlc_data add volume column, adhere working days etc. OANDA internal functions re-implemented encapsulated closure list. oanda_get_key() removed functionality incorporated elsewhere. New sub-plot functionality adds ‘gridExtra’ package dependency. ‘rlang’ package dependency retired longer required. Internal C++ code: now includes required cpp11 headers, adds rolling mean function, miscellaneous improvements. Minor performance improvements ichimoku(), plot functions, OANDA functions various utilities. Documentation refresh.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-110","dir":"Changelog","previous_headings":"","what":"ichimoku 1.1.0","title":"ichimoku 1.1.0","text":"CRAN release: 2021-08-23","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-1-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.1.0","text":"archive() moves using native RData format, enabling R object stored perfectly sha256 verification.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-1-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.1.0","text":"‘ArrowTabular’ method ichimoku() removed ‘arrow’ optional dependency retired. Fixes data types issue affecting dataframes returned oanda() v1.0.0. Fixes critical issues affecting Solaris platform v1.0.0.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-100","dir":"Changelog","previous_headings":"","what":"ichimoku 1.0.0","title":"ichimoku 1.0.0","text":"CRAN release: 2021-08-17","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-object-specification-v1-release-1-0-0","dir":"Changelog","previous_headings":"","what":"ichimoku object specification v1 release:","title":"ichimoku 1.0.0","text":"ichimoku objects created v0.x longer work correctly newer versions package. Upgrade latest package version run ichimoku() previously-created objects re-create according new specification (data preserved).","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-1-0-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 1.0.0","text":"New archive() function allows archiving ichimoku objects files stored Apache Arrow IPC file format. Also uses sha256 hashing ensure data integrity archives - adds optional dependency openssl package. oanda() gains capability download 5000 data periods multiple (rate-limited) requests ‘’ ‘’ arguments specified. look() can now inspect R object. ichimoku() gains new S3 method ArrowTabular class working Arrow Tables. tradingDays() gets ‘noholidays’ argument use markets trade 24/7 non-trading days. iplot() oanda_studio() now use ‘bslib’ (Shiny dependency) enable theming entire UI rather just chart. Infotip candle direction symbols updated greater clarity. xts_df() matrix_df() dataframe constructors gain ‘keep.attrs’ argument. set TRUE, returned dataframe retain custom attributes original object. Re-export functions working ichimoku objects: index(), coredata() ‘zoo’, xts() ‘xts’ package.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-1-0-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 1.0.0","text":"Implements caching certain OANDA variables retrieved used throughout session. Charts daily lower frequency now prettier usefully-aligned breaks. Improved handling timezones: OANDA data charts now show correctly user timezone. oanda() arguments ‘’ ‘’ can now take date-time format convertible POSIXct. oanda_studio() subsets plot window always show full cloud, consistent behaviour oanda_chart(). oanda_chart() oanda_studio() add explicit support ‘periods’ argument passed ichimoku(). oanda_chart() now passes additional parameters autoplot(). ichimoku() now enforces data types price data higher certainty success, robust handling matrices ‘data.frame’ compatible formats ‘tibble’. Fixes issue caused oanda() return weekly data certain cases. Corrects trade success statistics short strategies returned strat(). following functions longer exported keep package tidy: grid_dup(), maxOver(), minOver(), oanda_accounts(). sample_ohlc_data slightly lengthened better demonstrate strat features. Package now links ‘cpp11’ headers, retiring ‘Rcpp’ package dependency. Package dependency ‘httr’ switched ‘curl’. Miscellaneous performance optimisations. Documentation refresh.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-030","dir":"Changelog","previous_headings":"","what":"ichimoku 0.3.0","title":"ichimoku 0.3.0","text":"CRAN release: 2021-07-22","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-0-3-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 0.3.0","text":"OANDA fxTrade API interface retrieving price data: new oanda(), oanda_stream() oanda_chart() functions. oanda_studio() complete live analysis envrionment using OANDA data R Shiny app. iplot() re-launched using R Shiny. Introduces intuitive cursor infotip allows data read directly chart. look() function viewing informational attributes objects created package, extracting ichimoku objects lists returned autostrat(). strat() autostrat() gain new type/level 3 asymmetric strategies using different indicators position entry exit.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-0-3-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 0.3.0","text":"New dependencies ‘httr’ ‘jsonlite’ packages, required OANDA fxTrade API interface. strat() now takes optional ‘c3’ ‘c4’ arguments provide parameters complex strategies. allows combined strategy specified using single strat() call. iplot() now uses Shiny backend. Plotly charts retired. Argument ‘gaps’ plot functions deprecated remains available gplot() time . Chikou span now top layer plots visible candlesticks. Performance enhancements principal functions, including optimised data validation error handling code. Certain helper functions renamed consistency. Documentation refresh.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-020","dir":"Changelog","previous_headings":"","what":"ichimoku 0.2.0","title":"ichimoku 0.2.0","text":"CRAN release: 2021-06-17","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"new-features-0-2-0","dir":"Changelog","previous_headings":"","what":"New features:","title":"ichimoku 0.2.0","text":"Visualization layer: compute plot ichimoku cloud charts. Strategy layer: tools creating backtesting ichimoku strategies. ML layer: tools developing quantitative ichimoku solutions. New -greyscale ‘mono’ theme. tradingDays() helper function allow customisation holidays calculating future cloud.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"updates-0-2-0","dir":"Changelog","previous_headings":"","what":"Updates:","title":"ichimoku 0.2.0","text":"Ichimoku object specification updated. Ichimoku objects now inherit ‘xts’ ‘zoo’ classes better integration econometrics analytics packages. Package now requires compilation adds ‘Rcpp’ dependency due rolling window functions minOver() maxOver() using custom C++ algorithm. ‘RcppRoll’ ‘timeDate’ package dependencies retired. sample_ohlc_data updated better demonstrate new features. Updated CRAN release status.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-012","dir":"Changelog","previous_headings":"","what":"ichimoku 0.1.2","title":"ichimoku 0.1.2","text":"CRAN release: 2021-05-19 Added sample synthetic pricing dataset examples vignettes. Documentation changes CRAN release.","code":""},{"path":"https://shikokuchuo.net/ichimoku/news/index.html","id":"ichimoku-010","dir":"Changelog","previous_headings":"","what":"ichimoku 0.1.0","title":"ichimoku 0.1.0","text":"first pre-release ichimoku.","code":""}]